fivetran / fivetran/dbt_salesforce

[Feature] Update spine logic for `salesforce_history` models

Open
#54 0 comments 0 reactions 0 assignees View on GitHub
type:enhancement
Dominant language
No language data
Stars
53
Forks
38
PR merge metrics
No merged PRs in 30d

Description

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

- [X] I have searched the existing issues

### Describe the Feature

In [this PR](https://github.com/fivetran/dbt_salesforce/pull/52), we updated the logic of the model [int_salesforce__date_spine](https://github.com/fivetran/dbt_salesforce/blob/main/models/salesforce/intermediate/int_salesforce__date_spine.sql), which is used in `salesforce__daily_activity`. The `salesforce__*_history` models should also be updated to use similar coalesce logic, as well as the `dbt_utils.get_single_value` macro. This will help keep the logic consistent and simplify the code a bit.

The models affected are:

- `salesforce__account_daily_history`
- `salesforce__contact_daily_history`
- `salesforce__opportunity_daily_history`

### 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.
- [ ] No.

### Anything else?

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked PR and models/salesforce/intermediate/int_salesforce__date_spine.sql to understand the updated coalesce logic. Then inspect salesforce__account_daily_history, salesforce__contact_daily_history, salesforce__opportunity_daily_history, and the dbt_utils.get_single_value macro. Done means the history models and macro use consistent, simplified spine logic.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
data-engineering
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.