I m using csv samples to test my dbt models with dbt_utils.equality to check if my sample outup is the same as expected. However some of my column have the same type when I upload them on snowflake (making my test fail). To fix I try to use a yml properties for my seeds but it doesn't have any effect. For instance with this test csv the column exported will a NUMBER(32) but I specify it needs to be string.
samples_test.csv:
column_name
""
""
""
""
""
samples_test.yml:
version: 2
seeds:
- name: samples_test
columns:
- name: column_name
data_type: varchar(255)
Both of this file are in the seeds
folder
cmd used : dbt seed --profiles-dir .dbt_profiles --target dev --select samples_test
What should I change ?
I m using csv samples to test my dbt models with dbt_utils.equality to check if my sample outup is the same as expected. However some of my column have the same type when I upload them on snowflake (making my test fail). To fix I try to use a yml properties for my seeds but it doesn't have any effect. For instance with this test csv the column exported will a NUMBER(32) but I specify it needs to be string.
samples_test.csv:
column_name
""
""
""
""
""
samples_test.yml:
version: 2
seeds:
- name: samples_test
columns:
- name: column_name
data_type: varchar(255)
Both of this file are in the seeds
folder
cmd used : dbt seed --profiles-dir .dbt_profiles --target dev --select samples_test
What should I change ?
Share Improve this question asked Feb 17 at 15:12 user15915737user15915737 3205 silver badges26 bronze badges1 Answer
Reset to default 0You are missing the configs format expected by dbt. See docs here.
Therefore, what you would need is:
# this is your seeds/properties.yml
version: 2
seeds:
- name: samples_test
config:
column_types:
column_name: varchar(255)
other_column_name: boolean
yet_other_column_name: integer