-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
dbt 0.20.0rc1 not finding test on model itself #3496
Comments
Hey @joshpeng! This is intended as a feature in v0.20.0, implemented in #3235. (Original issue: #2891) Test selection has always done something pretty subtle, which is the jump from "select a model" to "select all tests that directly depend on that model." We decided that The version: 2
models:
- name: model_name
tests:
- dbt_utils.equality:
compare_model: ref('other_table_name')
columns:
- name: id
tests:
- unique All of the following selection criteria will select both the unique + equality tests:
In the first case, the test is selected indirectly because both of its parents are selected. In the other three cases, the test is selected directly by a graph selection method. There are prerelease docs for this new behavior here: https://next.docs.getdbt.com/reference/node-selection/test-selection-examples The final piece of context here is that we're working toward a
Let's say the definition of
I'm going to close this issue for the time being, but I'm still curious to hear your thoughts: Does this make sense to you? Do those docs help in clarifying the behavior? |
Describe the bug
I am using dbt_utils 0.7.0's equality test like this:
When I run
dbt test -m model_name
it saysWARNING: Nothing to do.
as if it couldn't find any tests to run. If I dodbt test
ordbt test -m model_name+
it does find and runs the test.If I downgrade to dbt 0.19.0 and dbt_utils 0.6.6, the same test is found at
dbt test -m model_name
and not as a downstream test of the model.Expected behavior
Believe the test should have been detected on the main model node of
-m model_name
and not as a downstream test like it did in dbt 0.19.0.System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using:
Mac
The output of
python --version
:3.8
The text was updated successfully, but these errors were encountered: