Skip to content

Add dbt version check and adapt dbt test module for upcoming deprecation#80

Open
itismichael wants to merge 5 commits into
rittmananalytics:masterfrom
itismichael:dbt_tests_version_check_dev
Open

Add dbt version check and adapt dbt test module for upcoming deprecation#80
itismichael wants to merge 5 commits into
rittmananalytics:masterfrom
itismichael:dbt_tests_version_check_dev

Conversation

@itismichael
Copy link
Copy Markdown

@itismichael itismichael commented May 27, 2024

Summary

This pull request adds a feature to check the installed dbt version and adapt test definitions accordingly. Specifically, it prepares for the announced deprecation where dbt will use data_tests: instead of tests: for test definitions in configuration files.

Changes

  • Added a dbt_version_util.py module with a function is_version_gte_1_8 to check the dbt version.
  • Modified dbt_test_module.py to use the new version check function and adapt test definitions based on the installed dbt version.

Motivation

See Issue #79 for details.

Testing

Tested locally with dbt versions to ensure correct behavior:

  • When running with dbt 1.7.x, droughty_schema.yml uses "tests:"
  • When running with dbt 1.8.1, droughty_schema.yml uses "data_tests:"

Related Issues

Closes #79

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.

New configuration syntax for dbt test definitions

1 participant