Support quoting columns in inferred schemas - #337
Conversation
If `infer_schema` is set to `quote`, then the columns will be quoted. This is useful in scenarios e.g., where the schemas are generated from nested JSON objects.
|
hi @jeremyyeo. does my approach here seem sound? I'd love to address this one way or the other, because the lack of quoting in inferred schemas is a significant shortcoming in our JSON-based schemas |
|
We would like to see this or similar change implemented as well. We have mixed case columns in parquet files that aren't handled properly in the current macro. The infer_schema = quote approach is conservative and makes sense, but I believe you could also just change the infer_schema = true scenario to use your logic. We currently have a custom macro set up that way. If a column in the external file is clean and UPPER case then the quotes will basically be ignored by Snowflake anyway. If it's mixed case or has periods then the quotes will apply. But this solution would work for our use case also. Would like to avoid having to use a custom version of the macro in our code. |
|
@bdavis-dfw yeah I'm not opposed to making it work with just |
|
I support the approach and would love to see this merged. I am failing to use the functionality because of special characters in some source system column names. |
Description & motivation
If
infer_schemais set toquote, then the inferred columns will be quoted. This is useful in scenarios where e.g., the schemas are generated from nested JSON objects.Addresses issue #336
Checklist