Skip to content

dbt: validate dbt_run/dbt_version facets, skip dbt_model - #337

Merged
tnazarew merged 2 commits into
mainfrom
dbt/skip-dbt-model-facet-schema
Nov 4, 2026
Merged

tnazarew merged 2 commits into
mainfrom
dbt/skip-dbt-model-facet-schema

Conversation

@tnazarew

@tnazarew tnazarew commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

dbt syntax validation fails on recent openlineage-dbt releases with facet type dbt_model not recognized.

openlineage-dbt has emitted the dbt_model dataset facet (DbtModelDatasetFacet) since about 1.47, with _schemaURL …/integration/common/openlineage/schema/dbt-model-dataset-facet.json. That schema file doesn't exist at any OpenLineage tag or on main: the facet is defined only in integration/common/src/openlineage/common/provider/dbt/facets.py. The validator has no schema to load, so the facet is reported as unrecognized.

At the same time dbt_run and dbt_version were skipped although their schemas are published (#257).

Change

  • Skip schema validation of dbt-model-dataset, next to the other dbt common facets. Revert once upstream publishes the schema.
  • Fold in Add dbt-run and dbt-version facets validation #257: load dbt-version-run-facet.json and dbt-run-run-facet.json in is_facet, so dbt_version and dbt_run are validated against their schemas.
  • Unlike Add dbt-run and dbt-version facets validation #257, dbt-version-run and dbt-run-run stay in the skip list as a fallback. The skip list is only used when no schema is loaded, and for OpenLineage < 1.40 the schemas live in integration/common/openlineage, which the spec collection in run_event_validation doesn't copy. Removing them would make those releases fail with not recognized.
  • Add dbt-run and dbt-version facets validation #257's producer/dbt/runner/openlineage.yml path change is left out: CI doesn't use that file (run.sh writes its own config).

Verification

  • Full dbt validation of the 1.54 events from CI run 38702151241 passes 23/23 with the dbt_model skip.
  • Facets generated with openlineage-integration-common==1.55.0, validated against the 1.55.0 spec collected the way CI does:
valid facets broken facets pre-1.40 spec (no dbt schemas)
this PR passes; dbt_run/dbt_version schema-validated, dbt_model skipped both type errors reported passes
#257 alone dbt_model not recognized errors reported + dbt_model all three not recognized

The PR checks skip the dbt job when only scripts/ changes, so the first CI run of this is the next dbt release check.

Supersedes #257.

🤖 Generated with Claude Code

openlineage-dbt emits dbt_model (DbtModelDatasetFacet) with _schemaURL
.../integration/common/openlineage/schema/dbt-model-dataset-facet.json,
but that file is not published at any OpenLineage tag or on main; the
facet exists only in facets.py. Syntax validation therefore fails with
"facet type dbt_model not recognized". Treat it like dbt_version and
dbt_run until upstream publishes the schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
@tnazarew
tnazarew force-pushed the dbt/skip-dbt-model-facet-schema branch from 30d77d5 to 0bc0e38 Compare November 4, 2026 17:08
Load dbt-version-run-facet.json and dbt-run-run-facet.json from the common
package so the dbt_version and dbt_run facets are schema-validated instead
of skipped. They stay in the skip list as a fallback for OpenLineage
releases before 1.40, whose schemas live outside the src/ layout that the
spec collection copies. dbt_model stays skipped, it has no published schema.

Folds in #257.

Co-authored-by: Pawel Marut <pawel.marut@xebia.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: tnazarew <tomasz.nazarewicz@getindata.com>
@tnazarew tnazarew changed the title Skip schema validation of the dbt_model dataset facet dbt: validate dbt_run/dbt_version facets, skip dbt_model Nov 4, 2026
@tnazarew
tnazarew marked this pull request as ready for review November 4, 2026 19:27
@tnazarew
tnazarew merged commit 47de5ed into main Nov 4, 2026
10 checks passed
@tnazarew
tnazarew deleted the dbt/skip-dbt-model-facet-schema branch November 4, 2026 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant