mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 01:15:08 +00:00
FIX CL-1632 - Remove Tier filters from AI agents in AutoPilot (#21454)
Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com>
This commit is contained in:
parent
c00ed22866
commit
a084b6090a
@ -360,8 +360,8 @@ public class CreateIngestionPipelineImpl {
|
||||
.withDatabaseFilterPattern(defaultFilters.get(DATABASE_FILTER_PATTERN))
|
||||
.withSchemaFilterPattern(defaultFilters.get(SCHEMA_FILTER_PATTERN))
|
||||
.withTableFilterPattern(defaultFilters.get(TABLE_FILTER_PATTERN))
|
||||
.withClassificationFilterPattern(new FilterPattern().withIncludes(DEFAULT_TIERS_TO_PROCESS))
|
||||
.withEnableAutoClassification(true);
|
||||
.withEnableAutoClassification(true)
|
||||
.withStoreSampleData(false);
|
||||
}
|
||||
|
||||
// Other Services Metadata Pipelines
|
||||
|
@ -103,29 +103,26 @@ public class RunAppImpl {
|
||||
.contains(app.getName());
|
||||
}
|
||||
|
||||
private String getTableServiceFilter(String serviceName) {
|
||||
return String.format(
|
||||
"{\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"term\":{\"entityType\":\"table\"}},{\"term\":{\"service.displayName.keyword\":\"%s\"}}]}}]}}}",
|
||||
serviceName);
|
||||
}
|
||||
|
||||
private Map<String, Object> getConfig(App app, ServiceEntityInterface service) {
|
||||
Object config = JsonUtils.deepCopy(app.getAppConfiguration(), Object.class);
|
||||
|
||||
switch (app.getName()) {
|
||||
case "CollateAIApplication" -> config =
|
||||
(JsonUtils.convertValue(config, CollateAIAppConfig.class))
|
||||
.withFilter(
|
||||
String.format(
|
||||
"{\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"bool\":{\"should\":[{\"term\":{\"tier.tagFQN\":\"Tier.Tier1\"}},{\"term\":{\"tier.tagFQN\":\"Tier.Tier2\"}}]}},{\"term\":{\"entityType\":\"table\"}},{\"term\":{\"service.displayName.keyword\":\"%s\"}}]}}]}}}",
|
||||
service.getName()))
|
||||
.withFilter(getTableServiceFilter(service.getName()))
|
||||
.withPatchIfEmpty(true);
|
||||
case "CollateAIQualityAgentApplication" -> config =
|
||||
(JsonUtils.convertValue(config, CollateAIQualityAgentAppConfig.class))
|
||||
.withFilter(
|
||||
String.format(
|
||||
"{\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"bool\":{\"should\":[{\"term\":{\"tier.tagFQN\":\"Tier.Tier1\"}},{\"term\":{\"tier.tagFQN\":\"Tier.Tier2\"}}]}},{\"term\":{\"entityType\":\"table\"}},{\"term\":{\"service.displayName.keyword\":\"%s\"}}]}}]}}}",
|
||||
service.getName()));
|
||||
.withFilter(getTableServiceFilter(service.getName()));
|
||||
case "CollateAITierAgentApplication" -> config =
|
||||
(JsonUtils.convertValue(config, CollateAITierAgentAppConfig.class))
|
||||
.withFilter(
|
||||
String.format(
|
||||
"{\"query\":{\"bool\":{\"must\":[{\"bool\":{\"must\":[{\"term\":{\"entityType\":\"table\"}},{\"term\":{\"service.displayName.keyword\":\"%s\"}}]}}]}}}",
|
||||
service.getName()))
|
||||
.withFilter(getTableServiceFilter(service.getName()))
|
||||
.withPatchIfEmpty(true);
|
||||
case "DataInsightsApplication" -> {
|
||||
DataInsightsAppConfig updatedAppConfig =
|
||||
|
Loading…
x
Reference in New Issue
Block a user