Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

itismichael
Copy link

@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