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 19 forks source link

BUG - [Expression to the left of comparison must be parenthesized at] #26

Closed yedynaki closed 2 years ago

yedynaki commented 3 years ago

Are you a current Fivetran customer?

Ihor Yedynak, Data Architect, Collegis Education

Describe the bug

I am getting the message below after setup and running model {{ salesforce_formula_utils.sfdc_formula_view('enrollmentrx_rx_enrollment_opportunity_c') }} Server error: Database Error in rpc request (from remote system) Syntax error: Expression to the left of comparison must be parenthesized at [539:42]

Steps to reproduce Add info to packages.yml file

Watch it fail šŸ‘€ haha

Expected behavior

Project variables configuration

copy dbt_project.yml here

Package Version

packages:
  - package: dbt-labs/dbt_utils
    version: 0.7.3

  - package: calogica/dbt_expectations
    version: 0.4.2
    # <see https://github.com/calogica/dbt-expectations/releases/latest> for the latest version tag

  - package: fivetran/salesforce_formula_utils
    version: [">=0.4.0", "<0.5.0"]
    # <see https://github.com/fivetran/dbt_salesforce_formula_utils/releases> for the latest versions

Warehouse

- [X] BigQuery - [ ] Redshift - [ ] Snowflake - [ ] Postgres - [ ] Databricks - [ ] Other (provide details below) **Additional context** **Screenshots**

Please indicate the level of urgency

Are you interested in contributing to this package?

fivetran-joemarkiewicz commented 3 years ago

Hi @yedynaki thanks so much for opening this issue!

Would you also be able to share the compiled code that resulted from this run? You will be able to find that in the target/compiled/[model_name] folder. If you could paste that in a comment below that would be extremely helpful!

FYI - It will be easiest to post in the comment if you first add "three apostrophes and sql" to the start of the code copy, and a "three apostrophes" at the end. Like the below (but wanting to remove the double quotes at the end):

```sql
select *
from table
"```"

Thanks!

fivetran-joemarkiewicz commented 3 years ago

@yedynaki wanted to bump the above request. Adding the additional information will help us understand the root of the issue and what we can do to resolve.

fivetran-joemarkiewicz commented 2 years ago

@yedynaki I believe this issue has been resolved in the latest release of the dbt package. I will close this issue, but please feel free to open the issue again if you see the error persist.

yedynaki commented 2 years ago

@yedynaki I believe this issue has been resolved in the latest release of the dbt package. I will close this issue, but please feel free to open the issue again if you see the error persist.

Thank you!