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
I would like to build a macro that can be used repeatedly to create dbt tests that test whether all column values match between two versions of dbt code.
This code should abstract away code that would be used for all such tests.
The idea is that I can run a single dbt test on a single table and say "ok, all those columns match up"; and like any dbt test, a single table is created in the warehouse for inspecting the results. (Writing the results to the log/console is great, but doesn't allow for programmatic/automatic checks.) Importantly, this lets dbt_audit_helper become part of a test suite in our production jobs and PR CI/CD.
Going forward, I would like to allow the test to receive arguments excluding columns that are expected to change, but this will provide useful functionality in the general case, and lead to expected test failures when a PR causes a data change.
Describe alternatives you've considered
Writing more verbose testing code
Running macros manually to test all columns and inspect results visually
Additional context
I will be building for Snowflake as this is the context in which we work--not sure if there will be db-specific needs.
Who will this benefit?
Anyone who wants to very rigorously test their changes as part of a dbt test suite.
Are you interested in contributing this feature?
Yup!
The text was updated successfully, but these errors were encountered:
Describe the feature
I would like to build a macro that can be used repeatedly to create dbt tests that test whether all column values match between two versions of dbt code.
This code should abstract away code that would be used for all such tests.
The idea is that I can run a single dbt test on a single table and say "ok, all those columns match up"; and like any dbt test, a single table is created in the warehouse for inspecting the results. (Writing the results to the log/console is great, but doesn't allow for programmatic/automatic checks.) Importantly, this lets dbt_audit_helper become part of a test suite in our production jobs and PR CI/CD.
Going forward, I would like to allow the test to receive arguments excluding columns that are expected to change, but this will provide useful functionality in the general case, and lead to expected test failures when a PR causes a data change.
Describe alternatives you've considered
Additional context
I will be building for Snowflake as this is the context in which we work--not sure if there will be db-specific needs.
Who will this benefit?
Anyone who wants to very rigorously test their changes as part of a dbt test suite.
Are you interested in contributing this feature?
Yup!
The text was updated successfully, but these errors were encountered: