Repository navigation
fix(ingest/tableau): stop overwriting schema and browse paths of upstream tables - #21802
aviraj-gour wants to merge 3 commits into
Conversation
49a6f87 to
09e537d
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Connector Tests ResultsAll connector tests passed for commit To skip connector tests, add the Autogenerated by the connector-tests CI pipeline. |
PR SummaryOverview Previously, only non-embedded upstreams were skipped when the flag was off, so embedded tables were still emitted and overwrote schema and browse metadata from warehouse connectors—breaking column-level lineage and UI browse.
Docs add a breaking-changes entry (stateful first-run soft-deletes, re-run warehouse connectors) and an Upstream Tables note in the Tableau source guide. The unit test is parametrized so embedded and external tables both stay un-emitted when the flag is off. Reviewed by Cursor Bugbot for commit 65ea642. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
1 issue found across 4 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="docs/how/breaking-changes.md">
<violation number="1" location="docs/how/breaking-changes.md:24">
P2: The stateful-ingestion explanation uses the wrong denominator and omits the stale-removal guard. Describe the threshold as the percentage of entities from the previous checkpoint missing from the current run, and qualify soft-deletion with `remove_stale_metadata: true` (the default).</violation>
</file>
Reply with feedback, questions, or to request a fix.
View guided diff | Turn on auto-fix | Re-trigger cubic
|
|
||
| **Before:** Tableau skipped only upstream tables it reports as external (`isEmbedded: false`) and emitted every other one, replacing the schema and browse paths that the warehouse's own connector had ingested. | ||
|
|
||
| **Now:** Tableau emits no upstream tables. Data sources still record them as upstreams, but a table that no other connector ingests, such as a CSV or Excel file (platform `external`), no longer exists as an entity and is not shown in the lineage graph. With stateful ingestion enabled, the first Tableau run after upgrading soft-deletes the tables it used to emit, including warehouse tables owned by another connector; they reappear once that connector runs again. If those tables are more than `stateful_ingestion.fail_safe_threshold` (default 75) percent of the run's entities, the run fails with "Entity difference exceeds fail_safe_threshold" and keeps failing until the threshold is raised. |
There was a problem hiding this comment.
P2: The stateful-ingestion explanation uses the wrong denominator and omits the stale-removal guard. Describe the threshold as the percentage of entities from the previous checkpoint missing from the current run, and qualify soft-deletion with remove_stale_metadata: true (the default).
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. At docs/how/breaking-changes.md, line 24:
<comment>The stateful-ingestion explanation uses the wrong denominator and omits the stale-removal guard. Describe the threshold as the percentage of entities from the previous checkpoint missing from the current run, and qualify soft-deletion with `remove_stale_metadata: true` (the default).</comment>
<file context>
@@ -15,6 +15,16 @@ the one you are on and the one you are moving to, not just the target.
+
+**Before:** Tableau skipped only upstream tables it reports as external (`isEmbedded: false`) and emitted every other one, replacing the schema and browse paths that the warehouse's own connector had ingested.
+
+**Now:** Tableau emits no upstream tables. Data sources still record them as upstreams, but a table that no other connector ingests, such as a CSV or Excel file (platform `external`), no longer exists as an entity and is not shown in the lineage graph. With stateful ingestion enabled, the first Tableau run after upgrading soft-deletes the tables it used to emit, including warehouse tables owned by another connector; they reappear once that connector runs again. If those tables are more than `stateful_ingestion.fail_safe_threshold` (default 75) percent of the run's entities, the run fails with "Entity difference exceeds fail_safe_threshold" and keeps failing until the threshold is raised.
+
+**Action:** with stateful ingestion enabled, run each warehouse connector after the first Tableau run following the upgrade. If that run hits the fail-safe, raise `fail_safe_threshold` for one run. To keep emitting upstream tables from Tableau, including file tables, set `ingest_tables_external: true`.
</file context>
| **Now:** Tableau emits no upstream tables. Data sources still record them as upstreams, but a table that no other connector ingests, such as a CSV or Excel file (platform `external`), no longer exists as an entity and is not shown in the lineage graph. With stateful ingestion enabled, the first Tableau run after upgrading soft-deletes the tables it used to emit, including warehouse tables owned by another connector; they reappear once that connector runs again. If those tables are more than `stateful_ingestion.fail_safe_threshold` (default 75) percent of the run's entities, the run fails with "Entity difference exceeds fail_safe_threshold" and keeps failing until the threshold is raised. | |
| **Now:** Tableau emits no upstream tables. Data sources still record them as upstreams, but a table that no other connector ingests, such as a CSV or Excel file (platform `external`), no longer exists as an entity and is not shown in the lineage graph. With stateful ingestion and stale-entity removal enabled (the default), the first Tableau run after upgrading soft-deletes the tables it used to emit, including warehouse tables owned by another connector; they reappear once that connector runs again. If the percentage of entities from the previous checkpoint that are missing from the current run exceeds `stateful_ingestion.fail_safe_threshold` (default 75), the run fails with "Entity difference exceeds fail_safe_threshold" and keeps the previous state until the threshold is raised. |
There was a problem hiding this comment.
Fixed in 65ea642. Soft-deletion is now qualified with stale-entity removal being enabled (the default). The fail-safe sentence is removed instead of corrected: upstream tables are a minority of a Tableau checkpoint (about 25–35% in the integration goldens), so the threshold is not reached and the run proceeds with a one-time soft-delete, which the entry now describes.
|
The fix looks right to me: Main ask: avoid the one-time soft-delete instead of documenting it With stateful ingestion on, the first run after upgrading soft-deletes every warehouse table Tableau used to emit. They vanish from search and lineage until the warehouse connector runs again, and a table that connector filters out stays deleted. Smaller points
|
…ream tables Tableau emitted schemaMetadata and browsePaths on every upstream table it reported as embedded, even with ingest_tables_external disabled. isEmbedded only says how Tableau tracks the table, not who owns it, so warehouse tables ingested by their own connector had their schema and browse paths replaced, hiding their column-level lineage in the UI. ingest_tables_external now gates emission of all upstream tables.
…stream tables Move the breaking-changes entry to the Next section with the PR number, and warn that the first stateful run can exceed fail_safe_threshold. Add an Upstream Tables note to tableau_pre.md and rewrite the ingest_tables_external description to say it controls whether upstream tables exist as entities.
65ea642 to
4bc44a4
Compare
Summary
The Tableau source wrote a full
schemaMetadataand a legacybrowsePathsaspect onto every upstream warehouse table that Tableau's Metadata API reports asisEmbedded = true, even withingest_tables_external: false.isEmbeddedonly describes how Tableau tracks the table, not who owns it. On sites without Tableau Data Management almost every table is embedded, so the flag skipped almost nothing.Both aspects are full upserts, so they replaced what the warehouse connector had ingested:
schemaMetadatabecameplatform: tableau,schemaName: "test", with Tableau's column casing (UPPERCASE for Snowflake) plusNullTypeduplicates from parsed custom SQL. Column-level lineage from SQL parsing and other connectors points at the warehouse's lowercase field paths, so it stopped rendering in the UI. The overwrite also caused schema-change notifications on every run.browsePathsV2moved the warehouse table under a Tableau project/datasource in Browse.ingest_tables_externalnow gates emission of all upstream tables:Tableau datasources still list these tables as upstreams. With the flag off, column-level lineage to Snowflake tables already matches against the schema the Snowflake connector ingested (
_match_snowflake_column_name), which now stays intact.Evidence
test_upstream_tables_are_emitted_only_when_enabledis now parametrized over embedded and external tables:is_embedded=Truefails: with the flag off,emit_upstream_tables()still yields a workunit.After: both cases pass.
ingest_tables_external: true.Merge Danger
Door: two-way
Reverting restores the old emission. Overwritten schemas are restored by the next run of the warehouse connector.
Blast Radius: default-config Tableau recipes
docs/how/breaking-changes.md.external), are no longer created and drop out of the lineage graph. Setingest_tables_external: trueto keep them.Checklist
🤖 Generated with Claude Code
Summary by cubic
Fixes the Tableau source overwriting the schema and browse paths of upstream warehouse tables, which broke their column-level lineage in the UI.
Previously, with
ingest_tables_external: false(the default), Tableau still emitted fullschemaMetadataandbrowsePathsaspects for every upstream table it tracks as embedded, replacing what the warehouse's own connector had ingested.isEmbeddedonly describes how Tableau tracks a table, not who owns it, so the flag skipped almost nothing.ingest_tables_externalnow gates emission of all upstream tables. Tableau datasources still record those tables as upstreams.Migration
ingest_tables_external: trueto keep them.Written for commit 4bc44a4. Summary will update on new commits.