You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue
Currently facing issue during compilation of staging view. It is due to a source column named 'START' (which is a reserved keyword in snowflake). So my steps were to escape this column using the derived columns function in staging.
However, I'm still facing the error because while it is compiling, the final 'START' column is not wrapped in quotes. Please see below sample for details.
Uh oh!
There was an error while loading. Please reload this page.
Issue
Currently facing issue during compilation of staging view. It is due to a source column named 'START' (which is a reserved keyword in snowflake). So my steps were to escape this column using the derived columns function in staging.
However, I'm still facing the error because while it is compiling, the final 'START' column is not wrapped in quotes. Please see below sample for details.
I'm thinking this might be a bug because according to the old dbtvault page (https://automate-dv.readthedocs.io/en/v0.9.0/macros/stage_macro_configurations/#escaping-column-names-that-are-not-sql-compliant), dbt will quotes all columns when generating the SQL. But when compared to the newer documentation page (https://automate-dv.readthedocs.io/en/stable/macros/stage_macro_configurations/#escaping-column-names-that-are-not-sql-compliant), I can see that the generated SQL no longer contains columns wrapped in double quotes.
Sample:
In Load model, I have added double quote to "START". Note that running the load model works, but not the Stage model.
In Stage model, I added the escape logic.
Environment
dbt version: v1.7
automate_dv version: 0.9.7
Database/Platform: Snowflake
The result in the compiled log:
with derived_columns (
...
"START" AS START
FROM source_model
)
What I want to achieve is:
with derived_columns (
...
"START" AS "START"
FROM source_model
)
Thanks.
AB#5704
The text was updated successfully, but these errors were encountered: