Skip to content

v1.2.0 — fewer false positives on Snowflake and package projects

Choose a tag to compare

@matbcassis matbcassis released this 11 Jun 15:48
· 1 commit to main since this release

Reliability fixes for the two deterministic query-fail checks (undefined_column_refs, broken_refs) on real Snowflake and package-heavy projects. A source-only run (no compiled manifest) used to emit whole classes of false positive at confidence: high. Those classes are now suppressed by construction.

undefined_column_refs:

  • SQL date-part keywords inside DATEADD, DATEDIFF, TIMEADD, and DATE_TRUNC (day, month, quarter, week, hour, minute, and the rest) are unit tokens, not column references. They are never flagged.
  • UNPIVOT(value FOR name IN (...)) value and name outputs are recognized as produced columns.
  • Lateral table functions (SPLIT_TO_TABLE, FLATTEN) expose system output columns (value, index, seq, ...) that are no longer read as undefined.
  • fivetran_utils.fill_staging_columns, get_columns_in_relation, and apply_source_relation are treated as macro-generated column sets. Without a compiled manifest the model is skipped, the same way dbt_utils.star already was.
  • A ref() resolves to its model, never a sibling CTE of the same name. A Jinja-stripped expression in a CTE select list now marks that CTE's shape unresolvable, so downstream scopes are skipped rather than checked against a placeholder column.

broken_refs:

  • When packages.yml or dependencies.yml is declared but the dependencies are not installed (dbt_packages/ absent) and no compiled manifest exists, unresolved refs are package models or user-supplied extension points, not broken refs. They move to issues.broken_refs_suppressed_no_deps and synthesis emits one aggregate "run dbt deps" notice. New output fields packages_unresolved and packages_unresolved_ref_count.

Verified on eight public projects: GitLab undefined_column_refs 31 to 0 and broken_refs 4 to 0, Stripe 218 to 0, Tuva broken_refs 327 to 0, with the genuine messy-jaffle-shop has_refund query-fail still firing. New regression fixture test-fixtures/sql-edge-cases/ and scripts/tests/test_undefined_column_refs.py pin every blind spot.