fivetran / fivetran/dbt_salesforce_formula_utils

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

Open
#83 1 comment 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Shell
Stars
18
Forks
21
Avg merge
15d 20h
Merged PRs (30d)
2

Description

### Is there an existing feature request for this?

- [X] 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](https://calendly.com/fivetran-solutions-team/fivetran-solutions-team-office-hours) for guidance.
- [X] No.

### Anything else?

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the sfdc_formula_view entry point and reproduce the example using fields_to_include=['quota_arr__c'] against the formula-field metadata described in the issue. Done means an unrecognized field produces an explicit error instead of silently omitting the field; the issue does not name a file or test to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
shell
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.