Repository navigation
Fixes #35383: Respect dbt source physical identifiers (2.0 backport) - #37644
Conversation
Backport of #35680 to 2.0. dbt sources now resolve their warehouse table through `identifier` instead of the logical `name`, for the source's own metadata, upstream lineage, table filters and test attachment.
Code Review ✅ Approved 🟡 Medium riskPhysical-identifier lookup changes dbt source metadata attachment and lineage; mistakes could associate source details or dependencies with the wrong table. Backports the dbt source physical identifier fix to 2.0, so sources resolve through 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 |
❌ 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 |
Describe your changes:
Fixes #35383
Backport of #35680 to
2.0. A dbt source can setidentifier(the warehouse table) separately from its logicalname. On 2.0 the source's table lookup usesname, so forname: orders, identifier: orders_v1:orderstable, or are dropped;orders → modelinstead oforders_v1 → model;Sources now resolve through the existing
get_source_physical_name()helper in both the data-model loop andparse_upstream_nodes_with_names, as a literal name (an identifier such asevents_*no longer wildcard-matches an arbitrary table). Models, seeds and snapshots are unchanged.Applied as the net diff of #35680 (head
74370483d93). The only conflict was an import line intest_dbt.py.Merge after #35680 lands on
main.Type of change:
Tests:
Same tests as #35680 (
TestDbtSourceIdentifiers+ manifest fixture), run on this branch:test_dbt.py+test_dbt_ingest.pyTestDbtSourceIdentifierswith the fixTestDbtSourceIdentifiersagainst unpatched 2.0metadata.pyruff format --checkclean on both changed Python files.Checklist:
Fixes #35383.🤖 Generated with Claude Code