Created
September 22, 2022 09:00
-
-
Save zoltanctoth/472485f342f3ce020e22ec5a987d5824 to your computer and use it in GitHub Desktop.
Creating a simple custom test (no extra parameters) in dbt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% test valid_age(model, column_name) %} | |
SELECT COUNT(*) FROM {{ model }} | |
WHERE NOT {{ column_name}} BETWEEN 0 and 125 | |
{% endtest %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment