Hey Team,
I'm encountering a case sensitivity conflict between Elementary CLI and my dbt + Snowflake setup. My dbt_project.yml file uses quoted, lowercase table names (e.g., "dbt_run_results"), which Snowflake treats as case-sensitive. However, when I run Elementary CLI, it searches for these table names in all caps (e.g., "DBT_RUN_RESULTS"), resulting in errors.
Searched for: NON_SAP_DEV.MEDIA.DBT_INVOCATIONS
Found: "NON_SAP_DEV"."MEDIA"."dbt_invocations"
I am using this configuration for quoting in dbt_project.yml
quoting:
database: true
schema: true
identifier: true
Explanation: This issue arises from the interaction between dbt, Snowflake, and Elementary CLI:
1. dbt Configuration: By using quotes in dbt_project.yml (e.g., "dbt_run_results"), we're explicitly telling Snowflake to treat these names as case-sensitive.
2. Snowflake Behavior: Snowflake is case-sensitive by default for object names. When queried with quotes, it looks for the exact case specified.
3. Elementary CLI Expectation: It appears that Elementary CLI is converting table names to uppercase when querying, which conflicts with the lowercase names in Snowflake.
This mismatch causes Elementary CLI to fail in finding the correct tables, leading to the compilation error we're seeing.
Question for the Community: Has anyone encountered a similar issue with Elementary CLI and case-sensitive databases like Snowflake? I'm looking for solutions that don't involve changing all my dbt configurations to uppercase. Any suggestions on how to configure Elementary CLI to respect case-sensitive table names would be greatly appreciated!