Repository navigation
[2.0] Fixes 37077: Hex lineage links source tables to the data model, not dashboard - #37166
Conversation
…ashboard (#37078) * fix(hex): link source tables to the data model, never the dashboard Tables only the warehouse query history names now link to the project's data model at node level instead of straight to the dashboard. A project whose cells give no columns still gets a data model when the query history names tables for it. The query-history lookup no longer drops a schema the query names, and BigQuery resolution retries a missed exact name case-insensitively, taking only a single match: LineageParser lower-cases Account to account, which used to fall back to every same-named table in the database. * fix(bigquery): try a shard family before a case variant A shard name such as events_20260101 misses the exact lookup by design; the family resolves it without a search request. * fix(hex): keep the query-history schema rule to Hex, give tables a data model Address self-review findings: - Leave get_table_entities_from_query as it was: Dremio view lineage relies on its schema fallback for nested folders. The Hex query fetcher now only asks for the fallback on a bare table name. - A project with tables to link but no columns (unreadable cells, or cells that read tables yet output none) gets a data model without columns, so its lineage isn't dropped. - Keep a data model without columns when this run finds no tables for it: the query history only looks back seven days. * fix(hex): keep a data model whose lookup fails, skip ambiguous bare names - A data model without columns whose lookup fails is kept rather than deleted with its lineage. - A bare name in the query history that matches several tables links none, as for cells. - Record the BigQuery case-insensitive retry in its own decision record. * chore(hex): prune G004 baseline entries for removed log calls * fix(hex): only keep a column-less data model built from query history A column-less data model with SQL came from cells, which are read each run; keeping it after they are deleted left it and its lineage behind. * fix(hex): keep a query-history data model beside cells that resolve nothing A data model only the query history fills was saved with the SQL of cells that read no resolvable table, so once its tables left the history's lookback window it looked built from cells and was deleted with its lineage. Write SQL only when the cells gave the data model columns or tables. * fix(hex): apply the prefix filter before judging a bare name ambiguous (cherry picked from commit 75b1bbd)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · Routing Hex lineage to data models and changing table resolution could misattribute or omit upstream table relationships. Backport of the Hex lineage fix to VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Backport of #37078 to
2.0. Fixes #37077.Cherry-picked with
-xfrom 75b1bbd.Conflict resolution
ingestion/.ruff-g004-baseline.jsondoesn't exist on2.0. The original commit only pruned entries from it, so I dropped that file from the backport. Every other file applied cleanly.Verification (on the
2.0base, with models regenerated from 2.0's schemas)pytest tests/unit/entity_resolution/test_resolver.py tests/unit/topology/dashboard/test_hex*.py: 325 passedruff check/ruff format --checkon the changed Python files: clean🤖 Generated with Claude Code
Summary by Gitar
This will update automatically on new commits.