jan_soubusta
01/19/2023, 11:13 AMtarget-postgres
and target-snowflake
in the same pipeline, where I transform data loaded by Meltano with dbt
.
Snowflake stores table/columns names upper-cased, PostgreSQL and all other DBs lower-cased.
In the dbt transformation, I handle column user
, which is a DB keyword, so I have to enclose it with double quotes - "user"
.
But it does not work with Snowflake, where I would have to use "USER"
.
Anyone knows any kind of workaround for this use case?
Isn't it possible to force Meltano to create tables with upper-cased/lower-cased table/column names?jan_soubusta
01/19/2023, 12:28 PM{% macro get_db_entity_name(entity_name, node) -%}
{%- if target.type == "snowflake" -%}
{{ entity_name.upper() }}
{%- else -%}
{{ entity_name }}
{%- endif -%}
{%- endmacro %}
thomas_briggs
01/19/2023, 2:22 PMthomas_briggs
01/19/2023, 2:23 PM