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 have searched the existing issues, and I could not find an existing issue for this bug
Current Behavior
while trying respond to a slack conversation thread
about implementing the new general config options for data_tests
found that local testing showed that some tests types are not accepting the config object it seems
version: 2
models:
- name: my_test_model # Replace with your actual model name
columns:
- name: id
data_tests:
- not_null:
config:
snowflake_warehouse: analytics
logs test may pass but logs will not show snowflake_warehouse being set
best guess is tests that just trigger a macro without having any real additional config are for some reason now not able to pull in the general config.
Expected Behavior
all test types should be able to have config options added based on the work done around #10197
Steps To Reproduce
create various simple models to test against
schema.yml
version: 2
models:
- name: my_test_model # Replace with your actual model name
columns:
- name: color
tests:
- accepted_values:
values: ['blue', 'red', 'green', 'yellow']
config:
snowflake_warehouse: analytics
# can sub out for a not_null test to match above
- name: my_test_model # Replace with your actual model name
columns:
- name: id
data_tests:
- not_null:
config:
snowflake_warehouse: analytics
- name: child_table
description: "Child table containing records referencing the parent table"
columns:
- name: parent_id
data_tests:
- relationships:
to: ref('parent_table')
field: id
config:
snowflake_warehouse: dbt_snowflake_warehouse
models
child_table.sql
select * from {{ ref('child') }}
parent_table.sql
select * from {{ ref('parent') }}
my_test_model.sql
select * from {{ ref('seed') }}
seeds
child.csv
id,parent_id,value
1,1,Value 1
2,1,Value 2
3,2,Value 3
4,3,Value 4 # Corrected parent_id to 3 which exists in parent_table
parent.csv
id,name
1,Parent A
2,Parent B
3,Parent C
seed.csv
id,color,value
1,blue,10
2,red,20
3,green,30
4,yellow,40
5,blue,50
6,red,60
7,blue,70
8,green,80
9,yellow,90
10,blue,100
Relevant log output
No response
Environment
- OS:
- Python:
- dbt:
Which database adapter are you using with dbt?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered:
Is this a new bug in dbt-core?
Current Behavior
while trying respond to a slack conversation thread
about implementing the new general config options for
data_tests
found that local testing showed that some tests types are not accepting the
config
object it seemslogs test may pass but logs will not show
snowflake_warehouse
being setbest guess is tests that just trigger a macro without having any real additional config are for some reason now not able to pull in the general config.
Expected Behavior
all test types should be able to have config options added based on the work done around #10197
Steps To Reproduce
create various simple models to test against
schema.yml
models
seeds
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: