Closed lmastalerz closed 3 months ago
Small update, regardless of what we do here, it will be still broken because of this issue: https://community.snowflake.com/s/article/Creating-an-external-table-using-INFER-SCHEMA-for-CSV-is-populating-data-only-in-the-value-column
@lmastalerz thanks for opening and updating @lmastalerz! I'm going to close this issue here as "won't do" as it looks like an issue on the Snowflake side
Describe the bug
When creating Snowflake external table using inference I need to provide a file format. In order to read column names I need to set
PARSE_HEADER = TRUE
in the format (and presumablySKIP_HEADER = 0
). The problem is that when I’m trying to query external table created with a format withPARSE_HEADER = TRUE
it throws:If I set
PARSE_HEADER = FALSE
, column names are not being recognised.Steps to reproduce
Expected results
Both columns inferred and table can be queried.
Actual results
Screenshots and log output
System information
Which database are you using dbt with?
The output of
dbt --version
:MacOS Python 3.10.9
Additional context
Potentially can be solved by following logic similar to this (one file format for inference, one for actual table). Perhaps two parameters are needed:
inference_file_format
andfile_format