Skip to content

Fixes 36948: Skip ambiguous Fivetran table lineage - #37462

Merged
harshsoni2024 merged 5 commits into
open-metadata:mainfrom
Vamsi-klu:fix/36948-unique-fivetran-lineage
Nov 19, 2026
Merged

harshsoni2024 merged 5 commits into
open-metadata:mainfrom
Vamsi-klu:fix/36948-unique-fivetran-lineage

Conversation

@Vamsi-klu

@Vamsi-klu Vamsi-klu commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #36948

When several database services contain the same logical table, Fivetran previously attached lineage to the first matching service. Table endpoints now require one distinct active entity across the configured services. Ambiguous or incomplete lookups emit an actionable warning and skip that edge, including when other tables in the pipeline resolve successfully.

With no configured services, discovery remains available but must also be unique. This fix does not add cleanup of existing incorrect edges; that remains a separate operator action. Restricting dbServiceNames with a matching pipelineFilterPattern remains the workaround for ambiguous sources.

Type of change:

  • Bug fix

High-level design:

The connector reuses the bounded EntityResolver and table lookup plans per service, deduplicates hydrated table UUIDs, and distinguishes not-found, ambiguous, and failed lookups. Each lookup closes its owned resolver while retaining the borrowed metadata client. Topic resolution and successful table/column lineage keep their existing behavior. The identity rule and upgrade implications are recorded in docs/decisions/2026-11-10-fivetran-table-lineage-requires-a-unique-entity.md.

Tests:

Use cases covered

Both service orders and endpoints; unique later-service matches; duplicate identities; absent database/schema/service; escaped literal names; stale/deleted entities; failed, incomplete, or oversized searches; mixed successful and ambiguous tables; table/topic edges; disabled entities; column lookup failures; self-edges; resolver cleanup and subsequent runs.

Unit tests

  • Baseline regression run: 33 failed, 2 passed. The ambiguous cases emitted the incorrect edge before the source change. The same focused selection passed all 35 tests after the fix.
  • make unit_ingestion ARGS="-n 0 tests/unit/topology/pipeline/test_fivetran.py tests/unit/source/pipeline/fivetran tests/unit/entity_resolution/test_resolver.py tests/unit/lineage/test_topic_lineage.py": 235 passed, 24 warnings.
  • Fivetran module line coverage: 308/335, 91.94%; FivetranSource class: 223/250, 89.2%. All 45 changed executable lines were covered. These figures come from the saved focused unit run, before integration coverage was appended.
  • make py_format, make py_format_check, and make static-checks passed. Static checks reported 0 errors and 137 warnings. Decision-record validation and git diff --check passed.

Backend integration tests

Not applicable, no Java or backend API changes.

Ingestion integration tests

make run_ometa_integration_tests ARGS="tests/integration/fivetran": 11 passed, 8 warnings. This suite uses a local HTTP server and requires no production credentials.

Playwright (UI) tests

Not applicable, no UI changes.

Manual testing performed

The automated tests execute the real connector, SDK, and resolver against fake HTTP boundaries. A live Fivetran ingestion was not run; the focused checks require no production credentials. The broader ingestion suite remains outside this focused PR check set.

UI screen recording:

Not applicable, Python ingestion fix.

Checklist:

  • Read the contribution guidelines.
  • Title follows Fixes <issue-number>: <short explanation> and the issue is linked above.
  • Added behavior regressions and recorded actual test results.
  • Self-review against REVIEW.md: fresh-context review of 24176c650f773be9938b8b551ad65d2ae999291b found no blocking issues or missing tests for changed behavior.
  • Decision check: the unique-entity contract is recorded in the ADR linked above.
  • No schema migration, generated-model edits, or UI recording is required.

Drafted-by: Codex GPT-6; reviewed by @Vamsi-klu before posting

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; no actionable issues were found.

Summary

Fivetran table lineage now requires one distinct active table across the selected database services instead of choosing the first match.

  • Fivetran links a table only when its match is unique.

No actionable issues found.

Reviews (4) · Last reviewed commit: "Merge branch 'main' into fix/36948-uniqu..." · Reviewed by Greptile

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR checks passed

The linked issue has a description and all required Shipping project fields set. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@harshsoni2024 harshsoni2024 added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Nov 18, 2026
@harshsoni2024
harshsoni2024 enabled auto-merge (squash) November 19, 2026 05:20
@gitar-bot

gitar-bot Bot commented Nov 19, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findings

Fivetran now skips ambiguous table endpoints instead of selecting the first match, which could leave lineage edges absent until service scope is clarified.

Fivetran table lineage now requires a single distinct active table across the configured services instead of attaching to the first match, and schema and database names are encoded in lookups. Resolved the finding that schema and database names were still looked up unencoded. No open issues found.

✅ 1 closed
✅ Edge Case: Schema and database names are still looked up unencoded

📄 ingestion/src/metadata/ingestion/source/pipeline/fivetran/metadata.py:577
This commit runs replace_separators on table_name only. CustomBaseModel.parse_name calls transform_entity_names on every non-service Create* model, so CreateDatabaseRequest and CreateDatabaseSchemaRequest names are stored encoded in the same way (for example stage>prod becomes stage__reserved__arrow__prod, and quotes become __reserved__quote__). A Fivetran schema or database whose name contains ::, >, ", , \r or is still searched under its raw name. The lookup then fails, and that edge is logged as "not found" and dropped. The fix is to encode all three TableReference parts the same way, and to add a parametrized case for a reserved character in the schema name.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@harshsoni2024
harshsoni2024 enabled auto-merge (squash) November 19, 2026 13:24
@harshsoni2024
harshsoni2024 merged commit f48c06f into open-metadata:main Nov 19, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Ingestion safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fivetran lineage binds same-named tables to the first service in dbServiceNames

3 participants