Skip to content

feat(dbt): nest generic test arguments under arguments property (closes #1680) - #1682

Merged
jschoedl merged 7 commits into
datacontract:mainfrom
opencode13241-eng:dbt-generic-test-arguments
Oct 1, 2026
Merged

jschoedl merged 7 commits into
datacontract:mainfrom
opencode13241-eng:dbt-generic-test-arguments

Conversation

@opencode13241-eng

Copy link
Copy Markdown
Contributor

This updates dbt generic test outputs to use the dbt 1.10+ syntax with parameters nested under an arguments property, resolving MissingArgumentsPropertyInGenericTestDeprecation.

As suggested in #1680, this covers:

  • export dbt-sources
  • export dbt-models
  • dbt sync (including test descriptions and relationships rewriting, while retaining compatibility with existing tests)
  • Corresponding unit tests

Closes #1680

DBT 1.10+ deprecated declaring generic test parameters directly under
the test key without an arguments mapping (MissingArgumentsPropertyInGenericTestDeprecation).

This updates export dbt-sources, export dbt-models, and dbt sync to emit
generic test parameters under the arguments property while preserving
backwards-compatibility in sync helpers when reading pre-existing tests.

Closes datacontract#1680
…le still uses the pre-arguments syntax

A versioned `dbt sync` compared the tests in the existing model YAML with the freshly generated ones
including the `arguments:` wrapper, so any file written by an earlier CLI release never matched. An
unchanged column was then forked into per-version overrides on the first sync after upgrading, and the
sibling version kept its old-syntax test (and dbt's deprecation warning). Both shapes now compare by
their arguments, so the column stays shared and is rewritten to the new syntax.
…ails on an older dbt

`datacontract dbt test` and `dbt sync --run-tests` now stop with "dbt 1.9.11 is not supported: the
generated tests need dbt 1.10 or later" instead of dbt's raw macro error when an older dbt fails to
parse the generated tests. The dbt guide and the dbt-models / dbt-sources export pages state the
dbt 1.10 minimum.
@jschoedl
jschoedl merged commit beda572 into datacontract:main Oct 1, 2026
19 checks passed
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.

DBT 1.10 and above raise MissingArgumentsPropertyInGenericTestDeprecation on dbt source yaml files created from an ODCS contract

2 participants