-
Notifications
You must be signed in to change notification settings - Fork 59
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
Default test name causes compilation error with --store-failures
flag
#925
Comments
--store-failures
flag
Thanks for reporting this @ClauPet ! I can't replicate this because we set But I absolutely believe you are experiencing this because I've seen the unfortunate consequences of Redshift's default behavior of ignoring quoted identifiers first-hand before. See below for example code that I think would reproduce this when The most direct way to overcome this to to set In the meantime, I'm going to transfer this to the ReprexCreate these files:
select 'A' as column_name union all
select 'B' as column_name
models:
- name: test
columns:
- name: column_name
tests:
- accepted_values:
values: ['A', 'B', 'C'] Run these commands: dbt run --select test
dbt test --select test --store-failures
dbt test --select test --store-failures |
Is this a new bug in dbt-core?
Current Behavior
I have the following dbt model:
test.sql
test.yml
After creating the model, I run the test doing
dbt test --select test --store_failures
. An empty table namedaccepted_values_test_column_name__a__b__c
is created in thedbt_test__audit
schema of my Redshift database. The second time I run the exact same command I get a compilation error saying that there is not tableaccepted_values_test_column_name__A__B__C
.Redshift by default uses case insensitive identifiers, e.g. table names. I know I could get around this by adding a custom lower case test names. However, this is not desirable with the amount of accepted values tests I have.
Expected Behavior
I would expect dbt to know of the case insensitivity of Redshift identifiers and not try to crate a table
accepted_values_test_column_name__A__B__C
.Steps To Reproduce
dbt test --store-failures
twiceRelevant log output
Environment
Which database adapter are you using with dbt?
redshift
Additional Context
No response
The text was updated successfully, but these errors were encountered: