-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
[CT-230] DBT seed converts empty strings to nulls #4725
Comments
Hi @snagapuri-mdsol, thanks for opening this! Although you can define columns' types using https://docs.getdbt.com/reference/resource-configs/column_types, it doesn't seem to treat empty strings as blanks, instead converting them to nulls. #2165 describes similar behaviour, in particular #2165 (comment)
I'm going to move this to the dbt Core repo, where the undesirable behaviour lives. It sounds like in the past we've decided against implementing a fix, but let's see whether there's more appetite this time! |
Thanks @joellabes will keep watching for new updates |
@snagapuri-mdsol thanks for opening this! We are still going to stick to the behavior for empty strings in CSVs. Since it is implemented in python standard CSV reader, and it seems to be standard outside python. |
Describe the bug
DBT seed process converts
all above cases to NULLs
I would say atleast quoted empty strings should be allowed to be as blank as its being explicit enough to be used as blank: ,"",
Steps to reproduce
Add any csv seed file with data like below:
column1,column2,column3
NULL,"",
All the above three columns produce NULLs in database table
Expected results
NULL,,NULL
Atleast second column in the above example can be left alone to be blank in order to have an option in seed process to add blanks in database tables
Actual results
NULL,NULL,NULL
System information
Which database are you using dbt with?
The output of
dbt --version
:The text was updated successfully, but these errors were encountered: