fix(ingest/tableau): stop overwriting schema and browse paths of upstream tables
Summary
The Tableau source wrote a full schemaMetadata and a legacy browsePaths aspect onto every upstream warehouse table that Tableau's Metadata API reports as isEmbedded = true, even with ingest_tables_external: false. isEmbedded only 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_external now gates emission of all upstream tables:
emit_upstream_tables
+ if not ingest_tables_external
+ return
for table in tableau databaseTables
- if not table.isEmbedded and not ingest_tables_external
- skip
emit_table(schemaMetadata, browsePaths)
- if ingest_tables_external
- emit remaining SQL-parsed tables
+ emit remaining SQL-parsed 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_enabled is now parametrized over embedded and external tables:
- Before:
is_embedded=Truefails: with the flag off,emit_upstream_tables()still yields a workunit.
After: both cases pass. - Tableau unit and integration tests: 478 passed, 4 xfailed. Integration goldens are unchanged because those recipes set
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
- 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 come back on that connector's next run. Documented in
docs/how/breaking-changes.md. - Upstream tables no other connector ingests, such as CSV or Excel files (platform
external), are no longer created and drop out of the lineage graph. Setingest_tables_external: trueto keep them.
Checklist
- The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
- Tests for the changes have been added/updated (if applicable)
- Docs related to the changes have been added/updated (if applicable)
- For any breaking change/potential downtime/deprecation/big changes an entry has been made in Breaking Changes
š¤ 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 full schemaMetadata and browsePaths aspects for every upstream table it tracks as embedded, replacing what the warehouse's own connector had ingested. isEmbedded only describes how Tableau tracks a table, not who owns it, so the flag skipped almost nothing.
ingest_tables_external now gates emission of all upstream tables. Tableau datasources still record those tables as upstreams.
Migration
- 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; run that connector to restore them. This happens once, since later Tableau runs no longer track those tables.
- Upstream tables no other connector ingests, such as CSV or Excel files, are no longer created and drop out of the lineage graph. Set
ingest_tables_external: trueto keep them.