"Edit Connection" table/schema/database filter save silently patches the wrong entity (never read by ingestion)
Summary
Editing table/schema/database filter patterns from a database service's "Edit Connection" page saves the pattern onto the wrong entity. The ingestion pipeline's Python runtime never reads that field, so the save has no effect on which tables/schemas get scanned — even though the UI shows a success toast and the filter chip appears saved ("Excluding N rules").
Repro
- Have an existing database service with a deployed metadata ingestion pipeline (e.g. a Redshift connector).
- From the service's connection settings, open Edit Connection.
- In the "Tables" (or Schemas/Databases) filter card, add an exclude rule (e.g.
contains big_ctas_data) and hit Save. UI shows the rule as saved ("Excluding N rules"). - Query the ingestion pipeline entity:
GET /api/v1/services/ingestionPipelines/name/{fqn}. ItssourceConfig.config.tableFilterPattern.excludesis unchanged — no trace of the new rule, andupdatedAton the pipeline does not move. - Trigger (or wait for) the pipeline run. It processes the table/schema the exclude rule was meant to skip, exactly as if the rule were never added.
Root cause
Filter patterns exist on two independent entities, and "Edit Connection" writes to the one the ingestion runtime never reads for an existing pipeline.
1. Connection.config.tableFilterPattern (e.g. RedshiftConnection.tableFilterPattern, openmetadata-spec/.../connections/database/redshiftConnection.json) — what "Edit Connection" writes to:
EditConnectionFormPage.component.tsx'shandleFiltersSavemerges the form data intoconnection.configand callspatchService(serviceCategory, serviceDetails.id, jsonPatch)(rest/serviceAPI.ts) — aPATCH /api/v1/services/{serviceCategory}/{id}.- The form itself is
FiltersConfigForm.tsx(components/Settings/Services/ServiceConfig/FiltersConfigForm.tsx); itsonSaveprop is wired directly tohandleFiltersSavefromEditConnectionFormPage. AddServicePage.component.tsx/EmbeddedAddServicePage.component.tsx(the create flow) have the same behavior — they also just PATCH/POST the service'sconnection.config. There is no UI-level pipeline seeding in the OSS create flow; any pipeline creation there is delegated server-side to an "AutoPilot" app trigger.
2. IngestionPipeline.sourceConfig.config.tableFilterPattern — the pipeline's own config, a separate entity at /api/v1/services/ingestionPipelines/{id}. The Python ingestion framework only reads this:
ingestion/src/metadata/ingestion/source/database/common_db_source.pyanddatabase_service.py:self.source_config: DatabaseServiceMetadataPipeline = self.config.sourceConfig.config; everyfilter_by_table/filter_by_schema/filter_by_databasecall readsself.source_config.*FilterPattern. Grepping all ofingestion/srcforservice_connection.tableFilterPattern/connection.tableFilterPatternreturns zero hits for any connector.- Traced
source_config's origin server-side:openmetadata-service/.../clients/pipeline/config/WorkflowConfigBuilder.java:source.setSourceConfig(ingestionPipeline.getSourceConfig())— built from theIngestionPipelineentity's own field, a completely separate schema tree fromserviceConnection(populated instead from the service entity'sconnection, peringestion/src/metadata/workflow/ingestion.py). ingestion/src/metadata/utils/filters.py: a single shared_filter()backs everyfilter_by_*helper, and both include and exclude branches usere.match(start-anchored, not full-string search) — a UI "contains X" rule needs to compile to.*X.*, not a bare substring, or it silently behaves like "starts with" instead.
The one place the connection-level field is read: openmetadata-service/.../governance/workflows/elements/nodes/automatedTask/createAndRunIngestionPipeline/CreateIngestionPipelineImpl.java copies connection.config.{table,schema,database}FilterPattern into a brand-new pipeline's sourceConfig when AutoPilot auto-provisions one. That's a one-time seed at creation time — after that, the connection-level field plays no further role in filtering. So it's not "fully dead code" in the strictest sense, but it is correctly inert for editing an already-existing pipeline's filters via "Edit Connection", which is what this issue is about.
Where filters actually need to be edited
The pipeline's own edit screen — service → Ingestion/Agents tab → the pipeline row → Edit — is EditIngestionPage.component.tsx, whose onEditIngestionSave calls updateIngestionPipeline (rest/ingestionPipelineAPI.ts), a PATCH /api/v1/services/ingestionPipelines/{id}. Its form, IngestionWorkflowForm.tsx, reuses the same FilterPatternField widget as FiltersConfigForm.tsx — visually identical filter UI, silently targeting a different backend entity depending on which page it's on. That's almost certainly why this wasn't caught by inspection: both screens look and behave identically to a user.
Suggested directions (not prescribing one)
- (a) Once a pipeline exists for the service, hide/disable the filter card on "Edit Connection" and point users at "Edit Ingestion" instead, or
- (b) make the "Edit Connection" save also PATCH the pipeline's
sourceConfig(handling services with zero or multiple pipelines) so the save does what the UI currently implies.
Verification once fixed
Repeat the repro above; step 4 should show sourceConfig.config.tableFilterPattern updated after saving from "Edit Connection" (if (b)), or the filter UI should no longer appear on that screen once a pipeline exists (if (a)).
Cross-filed
The same bug exists independently in Collate's own frontend (collate-local-webserver), which reimplements this page with different plumbing. Filed separately: open-metadata/openmetadata-collate#TBD
Cross-filed for Collate's own frontend (collate-local-webserver), which independently reimplements this page and has the same bug: open-metadata/openmetadata-collate#6460