Skip to content

MSSQL synonyms: Table.aliases is dropped on every table that already exists in OpenMetadata #33374

Closed

Description

@ulixius9

Describe the bug

Table.aliases (SQL Server synonyms, ingested via includeSynonyms — #31512) is silently dropped for every table that already exists in OpenMetadata. Only tables created for the first time ever receive their aliases.

When an entity already exists, TopologyRunnerMixin.yield_and_update_context emits a PatchRequest instead of a create. The sink then calls:

# ingestion/src/metadata/ingestion/sink/metadata_rest.py
self.metadata.patch(..., allowed_fields=ALLOWED_COMMON_PATCH_FIELDS, ...)

and build_patch diffs both models through model_dump_json(include=allowed_fields), so a field absent from the allow-list can never produce an operation. aliases is not in ALLOWED_COMMON_PATCH_FIELDS, so the synonyms are discovered, put into the create request, and then thrown away by the patch.

There is no error and no warning — the run reports 100% success.

To Reproduce

  1. Ingest an MSSQL service (tables get created).
  2. Create a synonym in SQL Server for one of those tables.
  3. Enable includeSynonyms and re-run metadata ingestion.
  4. GET /api/v1/tables/name/<fqn> → aliases is still null.

Log signature: Processed records: 0 / Updated records: N — Status.scanned routes PatchRequest/PatchedEntity into updated_records, so an all-updated run is an all-patch run.

Verified end-to-end against a 1.13.6 server with the released openmetadata-ingestion==1.13.6.0 agent, holding overrideMetadata constant:

agent overrideMetadata new synonym at source result
1.13.6.0 true dbo.prod_catalog_legacy alias not written
1.13.6.0 + "aliases": True true same alias written, entity v0.1 → v0.2, indexed

Expected behavior

A synonym added, changed or removed at the source is reflected in Table.aliases on every run, not just on first creation.

Additional context

  • overrideMetadata is not a workaround: it forces the patch but goes through the same allow-list.
  • sourceHash is in the allow-list, so a broken run still advances the stored hash and the connector then reports "no changes detected" and skips the table. Upgrading the agent alone therefore does not backfill: one run with overrideMetadata enabled is needed after the fix.
  • Affects main and 1.13 — the allow-list is identical on both.

Activity

  1. moved this to In Review / QA 👀 in Shippingon Sep 16, 2026
  2. moved this from In Review / QA 👀 to Done ✅ in Shippingon Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    • Status
      Done ✅
    • Status
      Done ✅

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions