-
Notifications
You must be signed in to change notification settings - Fork 127
Description
Describe the bug
When generating base models with table columns that are keywords, it does not escape them to the correct casing for the underlying source.
Steps to reproduce
Had a snowflake source table with a column name "ORDER". When generating the base models using codegen.create_base_models it did not escape the column, resulting in the generated output failing. In addition, as the column name was all uppercase, it was necessary to change the casing.
Expected results
If the underlying column was ORDER the name should be escape and match this case, i.e. not order, it should be "ORDER".
Actual results
Generates order.
Screenshots and log output
System information
**The contents of your packages.yml file:
packages:
- package: metaplane/dbt_expectations
version: [">=0.10.9", "<0.11.0"] - package: dbt-labs/dbt_utils
version: 1.3.1 - package: dbt-labs/codegen
version: 0.13.1
Which database are you using dbt with?
- postgres
- redshift
- bigquery
- snowflake
- other (specify: ____________)
The output of dbt --version:
Core:
- installed: 1.9.0
The operating system you're using: Linux
**The output of python --version: Python 3.11.2