-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Macro compilation error #57
Comments
@fivetran-joemarkiewicz I was wondering if you all heard anything back from dbt labs about the compilation error? Also, if there is any workaround we can do to call the macros directly in our model that would be good to know so we could use the package to get some models out the door for our salesforce team. |
Hi @calder-holt I was able to find the dbt-utils issue I had mentioned during our call. However, it seems we were able to address the issue and merged the fix into the package. Therefore, this issue must be some different variation we haven't accounted for yet 🤔. I am still looking into this, but having trouble recreating the issue on my end. Would you be able to share the contents of your |
@fivetran-joemarkiewicz absolutely! dbt_project.yml
sources.yml
|
Thanks @calder-holt I still haven't been able to replicate the error just yet. Can you confirm if your Snowflake instance is case sensitive? |
Hey @fivetran-joemarkiewicz we are on Redshift |
@calder-holt my apologies that may be the reason I am not able to replicate the issue at hand 🤦. I am not sure I was assuming you were on Redshift when you even called it out in the Issue description. Let me replicate my instance on Redshift and see if I have any luck! |
@calder-holt I was able to replicate a similar (not the same) error when running with the same src.yml configuration you have above. While, it is not the same error, I think it may be leading us in the right direction. I noticed when adding the following to my src.yml quoting:
database: false
schema: false
identifier: false I started to get compilation errors. Once I removed them, I started to see successful runs. Would you mind removing those temporarily to see if that fixes the issue at hand? |
Hi @calder-holt 👋 I was just curious if the above suggestion ended up working for you? |
Hey @fivetran-joemarkiewicz sorry for the delayed response here! Removing those lines from the src.yml file I still get the same errors:
|
No worries at all! If you copy and paste select *
from "raw_fivetran"."salesforce"."fivetran_formula"
limit 10 Or do the database.schema.table all need to be capitalized? If that is the case, we may be able to apply a fix to address that. Before diving into that solution, curious what the results (does it successfully run in Redshift) of the above query are in your warehouse. |
@fivetran-joemarkiewicz that query executes fine as is (no changes to capitalization necessary) |
Hi @calder-holt this is very interesting. This seems to be a dbt-core related issue in my opinion. Since the compiled code executes as expected, I am unsure why it does not materialize when running through dbt 🤔. A few suggestions I have:
I apologize we have not been able to come to a conclusion as to why this is not working on your end. However, it is suspicious that the package compiles the correct code but is not able to materialize. Hopefully someone from dbt-labs will be able to point us in the right direction. |
Hi @calder-holt it seems this issue has gone a bit stale. As the best path forward here is most likely to open an inquiry with dbt-labs, I will close this issue. Please feel free to reopen this issue if you feel there is still more to discuss. |
Is there an existing issue for this?
Describe the issue
Attempting to create a model using the macro for this package yields a compilation error.
{{ salesforce_formula_utils.sfdc_formula_view(source_table='account') }}
Relevant error log or model output
Expected behavior
Compiles to a model with formula fields
dbt Project configurations
salesforce_schema: salesforce
salesforce_database: raw_fivetran
account_pass_through_columns: [created_date, created_by_id, implementation_tier_c, new_business_opportunity_c, active_recruiting_subscription_tier_c, churn_reason_c, renewal_at_risk_c, contract_end_date_c, ghsa_arr_company_wide_c, ghsa_arr_seats_quantity_c, ghsa_arr_seats_c, implementation_manager_c, account_executive_c, service_tier_c, gho_arr_c, ghr_arr_c, crm_arr_c, inclusion_arr_c, region_c, number_of_hires_30_c, number_of_hires_60_c, number_of_hires_90_c, number_of_hires_12_months_c, all_active_subscriptions_c, implementation_consultant_email_c]
opportunity_pass_through_columns: [contract_length_c, created_by_id, last_stage_change_date, sdr_c, marketing_lead_source_c, arr_for_quota_c, date_reached_negotiate_c, date_reached_close_c, date_reached_validate_c, date_reached_develop_c, date_reached_prove_c, arr_up_for_renewal_gho_c, arr_up_for_renewal_ghr_c, arr_up_for_renewal_services_c, arr_up_for_renewal_total_c, arr_up_for_renewal_ghsa_company_wide_c, arr_up_for_renewal_ghsa_seats_c, gho_arr_c, ghr_arr_c, services_arr_c, ghsa_arr_company_wide_c, ghsa_arr_seats_c, ghsa_seats_quantity_c]
user_pass_through_columns: [created_date, quota_current_month_c, quota_current_quarter_c, quota_current_year_c, time_to_first_opp_c, time_to_full_quota_c]
contact_pass_through_columns: [created_date, created_by_id, marketing_lead_source_c, onboarding_demo_request_c, sourcing_automation_demo_request_c, converted_lead_id_c, lead_created_date_c, requested_demo_timestamp_c]
lead_pass_through_columns: [sdr_c, world_region_c, marketing_lead_source_c, marketing_status_c, onboarding_demo_request_c, sourcing_automation_demo_request_c, converted_timestamp_c, mql_timestamp_c, requested_demo_timestamp_c]
Package versions
0.6.5
What database are you using dbt with?
redshift
dbt Version
1.0.4
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: