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! |
Code Review ✅ Approved🟡 Medium risk · Resolving dbt sources by physical identifiers changes metadata and lineage targets; incorrect identifier resolution could attach metadata or edges to unintended tables. Makes dbt source metadata and downstream lineage attach to the physical 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. A maintainer must send the formal review request; the author has read access to the upstream repository.
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.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.