Repository navigation
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
@ulixius9, could you review the dbt source identifier resolution and lineage fallback in this fix? It reuses |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Keep binding resolution for dbt table lookup, and escape source identifiers so wildcard characters stay literal. Co-authored-by: deepinsight coder <[email protected]>
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Bumping this for review. @ulixius9 could you take a look at the dbt source identifier change in dbt/metadata.py? @mohittilala is already requested. |
context.exposures is set inside yield_data_models, so calling add_dbt_exposure directly after get_dbt_objects raised AttributeError.
Code Review ✅ Approved 🟡 Medium riskResolving dbt sources by physical identifiers changes metadata and lineage attachment; an incorrect identifier could omit metadata and upstream relationships. Fixes dbt source metadata and downstream lineage so sources declaring a logical 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 |
Describe your changes:
Fixes #35383
When a dbt source declares
name: ordersandidentifier: raw_orders, attach its metadata and downstream lineage toraw_orders. Both source enrichment and upstream resolution now use the existing identifier-aware helper. Logicalsource()references and model, seed and snapshot aliases retain their current behavior.Suggested reviewers
@ulixius9.
Type of change:
High-level design:
Use
get_source_physical_namefor normalized source resource types at the two table-resolution sites inDbtSource. Keep the existing filtering, catalog mapping, cross-service resolution and resolved-entity UUID/FQN handling. Add a source manifest fixture and 42 parametrized regressions.Tests:
Use cases covered
Unit tests
Updated
ingestion/tests/unit/test_dbt.pyand addedingestion/tests/unit/resources/datasets/manifest_source_identifier.json.test_dbt.pytest_dbt_ingest.py,test_dbt_test_definition.py,test_dbt_test_descriptions.py,test_dbt_config_errors.py,test_dbt_http_config.pyThe first two passing runs supplied empty table/metric custom-property definitions at the legacy HTTP setup boundary. Manifest parsing, transformations, FQNs and lineage generation used the real implementation. The final 66-test run used ordinary pytest:
Coverage:
yield_data_models94.59% lines;parse_upstream_nodes_with_names100% lines. Wholemetadata.pycoverage is 72.90% lines and 64.86% branches, below the 90% whole-class target.make -C ingestion py_format py_format_checkpassed, with 3,094 files unchanged/already formatted. Scoped basedpyright reported 0 errors and 0 warnings against a temporary copy of the project baseline.git diff --checkpassed. The full ingestion unit suite and full static-check suite were not run.Fresh validation after the upstream merge at
44e98cb624538cb9c22921a32b63012f4d8a44a8: 66 focused tests passed in 3.01s and 60 adjacent tests passed in 0.19s, both with ordinary pytest andPYTHONPATH=src, without the earlier HTTP-boundary harness. Current-schema model generation and installation completed. Scoped Ruff lint and format checks andgit diff --checkpassed. All three dbt implementation/test files remain byte-identical to the previously validated source; the upstream merge introduced no dbt source changes.Backend integration tests
Not applicable, Python ingestion changes only.
NOT NEEDED for this Python-only PR.
Ingestion integration tests
Three scripted workflows passed against the source-built local OpenMetadata server, using real
MetadataWorkflow, themetadata-restsink and persisted REST/lineage assertions:raw_orders; table and column lineage point tostg_orders; the decoy remains untouched. Zero workflow errors or warnings.Import-based discovery found three affected unit files, all run above, and no importing integration test or dbt ingestion integration directory. The API workflows are local smoke scenarios; no permanent integration runner or full ingestion integration-suite run is claimed. No warehouse is required.
Playwright (UI) tests
Not applicable, no UI changes.
NOT NEEDED for this Python-only PR.
Manual testing performed
The scripted API checks created a unique service, database/schema, physical
raw_orders, aliasedstg_ordersand logicalordersdecoy. They ran the actual dbt workflow with and without a catalog, fetched table metadata and lineage, then repeated the missing-physical-table case. No human manual session is claimed.UI screen recording:
Not applicable, ingestion-only bug fix.
Checklist:
Fixes <issue-number>: <short explanation>.Fixes #35383.

Confidence Score: 5/5
The PR appears safe to merge; no actionable new issue was found.Summary
The PR attaches dbt source metadata and lineage to physical identifiers while keeping logical dbt names intact.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR A[dbt source] --> B[Physical identifier] B --> C[Literal table lookup] C --> D[Resolved table FQN and ID] D --> E[Source metadata] D --> F[Downstream lineage] D --> G[Freshness tests]Reviews (2) · Last reviewed commit: "Fixes 35383: Resolve dbt source identifi..." · Reviewed by Greptile