Closed nic-sharesies closed 2 years ago
Thanks @nic-sharesies, for the detailed issue and the PR with the fix! Thanks also to @jeremyyeo for bumping this one to my attention, so that we could make the connection to #118.
Rather than an increasingly complex case when
statement defined within the macro, I'm going to close this one, in favor of consolidating with the change requested + proposed in #118.
Describe the bug
After we upgraded to dbt v1.0.0, we started having errors selecting from Snowflake External Tables. This was due to the CSV files in S3 containing blank double quoted values, e.g.
""
. Snowflake was storing these as text as opposed to null, leading to cast type errors.Steps to reproduce
1) Have a CSV file in S3 that contains blank double quoted fields using a non char data type, i.e. timestamp 2) Create a Snowflake External Table using that CSV as the source 3) Select from that table in Snowflake
Expected results
Blank fields cast to data type as expected and Snowflake query returns result set.
Actual results
Snowflake fails to cast to data type and throws an error.
Screenshots and log output
System information
The contents of your
packages.yml
file:Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: MacOS Monterey 12.1 The output of
python --version
: 3.9.9Additional context
PR created with fix https://github.com/dbt-labs/dbt-external-tables/pull/131