We have a number of legacy models in dbt that are leveraging quoted identifiers to preserve casing for downstream use cases, however dbt-codegen does not appear to preserve the case sensitivity when running the generate_model_yaml output.
Example:
models/marts/order_data.sql:
select
"OrderID",
"OrderDate",
"OrderQuantity"
from {{ ref('upstream_order_data') }}
Changing the project.yml quoting configurations appears to have no effect on this behavior.
Describe alternatives you've considered
Our hope is to eventually stop utilizing quoted identifiers all together, but we need to clean up some downstream dependencies first. For now we've been using the macro as a starting point and manually update as needed.
Additional context
This is obviously very likely Snowflake-specific, but occurs globally in our environment
Who will this benefit?
Any Snowflake users that are currently leveraging quoted identifiers downstream.
Are you interested in contributing this feature?
We'd love to help in any way we can, but could use some guidance on what an ideal solution would be
Describe the feature
Adapter: dbt-Snowflake v1.7.4 dbt-codegen Version: 0.12.1
We have a number of legacy models in dbt that are leveraging quoted identifiers to preserve casing for downstream use cases, however dbt-codegen does not appear to preserve the case sensitivity when running the
generate_model_yaml
output.Example:
models/marts/order_data.sql:
However, when I compile the following script:
It compiles to:
Which does not allow dbt documentation/explorer to recognize the field names in the table. It would be great if we had something like the following:
Which would preserve the case of the field names and result in something like:
Changing the project.yml quoting configurations appears to have no effect on this behavior.
Describe alternatives you've considered
Our hope is to eventually stop utilizing quoted identifiers all together, but we need to clean up some downstream dependencies first. For now we've been using the macro as a starting point and manually update as needed.
Additional context
This is obviously very likely Snowflake-specific, but occurs globally in our environment
Who will this benefit?
Any Snowflake users that are currently leveraging quoted identifiers downstream.
Are you interested in contributing this feature?
We'd love to help in any way we can, but could use some guidance on what an ideal solution would be