You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit beda572
Browse filesBrowse the repository at this point in the historyBrowse files
feat(dbt): nest generic test arguments under arguments property (closes#1680) (#1682)
* feat(dbt): nest generic test arguments under arguments property
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#1680
* style: apply ruff format to the dbt test changes
* fix(dbt): keep a versioned column's tests shared when its existing file 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.
* refactor(dbt): drop the unreachable pre-arguments branch from the relationships ref rewrite
* test(dbt): keep one pre-arguments case in the test-description templates
* feat(dbt): explain that dbt 1.10 or later is required when dbt test fails 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.
* Add CHANGELOG entry
---------
Co-authored-by: Jakob Schödl <jakob.schoedl@entropy-data.com>
Copy file name to clipboardExpand all lines: docs/docs/exports/dbt-models.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,8 @@ models:
64
64
65
65
If a server is selected via `--server` (based on its `type`), the dbt column `data_types` match the expected data types of that server. If no server is selected, it defaults to `snowflake`.
66
66
67
+
The generated tests need dbt 1.10 or later.
68
+
67
69
See the [dbt Integration](../dbt.md) guide for the full picture, including `datacontract dbt sync`.
68
70
69
71
All options: **[`datacontract export dbt-models`](../commands/export/dbt-models.md)**.
0 commit comments