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
Customer uses --store-failures on some columns in the same model, multiple instances of a test with a where clause. For example: two different dbt_util.accepted_range tests on different subsets of the same column.
They experienced errors in v0.21 with --store-failures due to duplicate test names. Aliasing the tests resolved the dupe issue, but since they upgraded to 1.0, this doesn't seem to be working anymore.
Expected Behavior
Both tests run with the two aliases from the test config in the yml to differentiate between the two.
Steps To Reproduce
Use environment on v1.0.0 or v1.0.1
Add 2 tests to the same column with different where clauses.
Run dbt test --store-failures
Error:
Compilation Error
dbt found two resources with the name "dbt_utils_accepted_range_test__0"
Since these resources have the same name,
dbt will be unable to find the correct resource when "dbt_utils_accepted_range_test__0" is used.
Relevant log output
No response
Environment
- dbt: 1.0.1
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered:
It's a pretty thorny intricate thing that's happening:
Test configs (including where) aren't factored into a test's unique name construction. Test arguments are. This gets to a philosophical question of: When is a test the same? When is it different?
In previous versions of dbt, this didn't work either! The second test would silently overwrite the first test; as a result, dbt test would only run one of them. In v1.0, dbt now raises an explicit error, saying it's found the same test defined twice.
I'm going to close this issue, to keep the conversation centralized over in #4102
Is there an existing issue for this?
Current Behavior
Customer uses
--store-failures
on some columns in the same model, multiple instances of a test with awhere
clause. For example: two differentdbt_util.accepted_range
tests on different subsets of the same column.They experienced errors in v0.21 with
--store-failures
due to duplicate test names. Aliasing the tests resolved the dupe issue, but since they upgraded to 1.0, this doesn't seem to be working anymore.Expected Behavior
Both tests run with the two aliases from the test config in the yml to differentiate between the two.
Steps To Reproduce
dbt test --store-failures
Relevant log output
No response
Environment
- dbt: 1.0.1
What database are you using dbt with?
snowflake
Additional Context
No response
The text was updated successfully, but these errors were encountered: