fivetran / dbt_salesforce_formula_utils

Package containing dbt macros to help generate salesforce formula fields synced from Fivetran.
https://fivetran.github.io/dbt_salesforce_formula_utils/
Apache License 2.0
16 stars 18 forks source link

[Bug] Snowflake Quoted Identifiers Support Needed #68

Closed fivetran-joemarkiewicz closed 1 year ago

fivetran-joemarkiewicz commented 1 year ago

Is there an existing issue for this?

Describe the issue

For customers using mixed casing in Snowflake (and probably other warehouses) are running into issues around quoted identifiers not being supported within the sfdc_formula_view() macro.

This should be supported for users who have this type of warehouse implementation.

Relevant error log or model output

Usually it is a 'MODEL' not found type error.

Expected behavior

The solution works as expected regardless of the warehouse environment setup.

dbt Project configurations

N/A

Package versions

v0.7.1

What database are you using dbt with?

snowflake

dbt Version

dbt v1.3.0

Additional Context

The solution should be an additional argument to the macro that lets customers elect if they need to use the quoted identifier fix.

The below worked for a customer implementation when modifying sfdc_formula_view and should be leveraged when building out the solution.

{%- set table_results = dbt_utils.get_column_values(table=source(source_name, 'fivetran_formula_model'), column='"model"', where="\"object\" = '" ~ source_table ~ "'") -%}

Are you willing to open a PR to help address this issue?