Skip to content
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

[Feature] Create Error Message if "fields_to_include" is not recognized #83

Open
2 of 4 tasks
klmopenspace opened this issue Apr 25, 2023 · 1 comment
Open
2 of 4 tasks
Labels
enhancement New feature or request

Comments

@klmopenspace
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

I was trying to ingest "Quota_ARR__c" from the opportunity into dbt given that it is a formula field in Salesforce. However, no matter what I did, I couldn't get it to work. Despite writing the write syntax (see below), the opportunity table would load, but without "Quota_ARR__c".

{{ salesforce_formula_utils.sfdc_formula_view( source_table='OPPORTUNITY', fields_to_include=['quota_arr__c'], full_statement_version=false) }}

Because of this, I looked at the Fivetran UI schema to see how it was spelled (which was the same as the way as I wrote it above) & looked at the Salesforce API. However, when I looked at the fivetran_formula table ingested into Snowflake, I saw it was written with 1 underscore rather than 2.

Given this, I highly recommend you create a safeguard that if it is incorrectly written, that the code snippet doesn't run and/or creates an error. I spent hours trying to figure out why this wasn't running until finally realizing it should be 1 underscore, not 2

Describe alternatives you've considered

No response

Are you interested in contributing this feature?

  • Yes.
  • Yes, but I will need assistance and will schedule time during your office hours for guidance.
  • No.

Anything else?

No response

@klmopenspace klmopenspace added the enhancement New feature or request label Apr 25, 2023
@fivetran-joemarkiewicz
Copy link
Collaborator

Hi @klmopenspace thanks for raising the troubleshooting issue you encountered and providing a possible resolution in this feature. I think this could be something we fold into a future update to the package.

My one question would be around what your preferred method of raising a warning would be? We could provide a few options:

  • Make the model flat out fail if the fields_to_include do not find a match. This would ensure the model only succeeds if there are in fact fields to map to in the source.
  • Provide a CLI warning informing about the fields that do not find a match. This would allow the model to succeed, but would only provide a CLI warning that X field did not find a match.

Let me know your thoughts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants