[PARSE_SYNTAX_ERROR] Syntax error at or near 'as': missing ')'.(line 411, pos 158)
The compiled SQL is:
select
service_appointment__table.`id`,
...
service_appointment__table.`customer_cancel_request_received_by_c`,
view_sql_1.secondary_campaign_c
from
`fivetran`.`salesforce`.`service_appointment` as service_appointment__table,
(
select
main__table.id,
(
opportunity__alias.secondary_campaign_c
) as secondary_campaign_c
from
`fivetran`.`salesforce`.``service_appointment as main__table
left join `fivetran`.`salesforce`.``opportunity as opportunity__alias on main__table.opportunity_c = opportunity__alias.id
) as view_sql_1
where
service_appointment__table.id = view_sql_1.id
There are two syntax errors in this compilation:
`fivetran`.`salesforce`.``service_appointment as main__table
left join `fivetran`.`salesforce`.``opportunity as opportunity__alias
Relevant error log or model output
No response
Expected behavior
The compiled SQL should have the table name properly wrapped with backticks:
`fivetran`.`salesforce`.`service_appointment` as main__table
left join `fivetran`.`salesforce`.`opportunity` as opportunity__alias
Hi @corca! Thanks for opening this ticket. We've updated the package with the fixes in this most recent release (v0.9.1), and as such will be closing this out. Let us know if there's anything else!
Is there an existing issue for this?
Describe the issue
I'm running the following model using salesforce_formula_utils 0.9.0 with dbt Core 1.4.5 on Databricks and encountering a syntax error
Error:
The compiled SQL is:
There are two syntax errors in this compilation:
Relevant error log or model output
No response
Expected behavior
The compiled SQL should have the table name properly wrapped with backticks:
dbt Project configurations
N/A
Package versions
What database are you using dbt with?
databricks
dbt Version
1.4.5
Additional Context
No response
Are you willing to open a PR to help address this issue?