For dbt seeds and csv
format of unit testing, empty strings (""
) and "null"
both convert to NULL
#4867
Labels
content
Improvements or additions to content
dbt Core
The changes proposed in this issue relate to dbt Core
improvement
Use this when an area of the docs needs improvement as it's currently unclear
Contributions
Link to the page on docs.getdbt.com requiring updates
https://docs.getdbt.com/docs/build/seeds
What part(s) of the page would you like to see updated?
Many people are surprised about how CSV seeds treat certain values.
Namely, all of these will produce
NULL
values within the database when loaded viadbt seed
:seeds/null_examples.csv
But these will produce not null strings (`` and
None
respectively):seeds/not_null_examples.csv
Example commands & output
Net consequence
There are two values that you can't load directly with CSV seeds:
""
/''
)"null"
In order to create those values, then we'd described a workaround at a high-level here.
👉 It might be handy for us to actually provide an example of that:
seeds/sentinel_examples.csv
models/example_seed_wrapping.sql
Output
Additional information
Here are some of the related issues and discussions:
null
aren't working forsession
connection method dbt-spark#901 (comment)The text was updated successfully, but these errors were encountered: