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

[Bug] Date spine model is inconsistent when selecting opportunity and lead for min/max #47

Closed
1 of 4 tasks
fivetran-joemarkiewicz opened this issue Feb 5, 2024 · 1 comment
Assignees
Labels
error:forced status:in_progress Currently being worked on type:bug Something is broken or incorrect update_type:documentation Primary focus requires documentation updates update_type:models Primary focus requires model updates

Comments

@fivetran-joemarkiewicz
Copy link
Contributor

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

In the int_salesforce__date_spine model there is logic to select the min and max start and end times in order to generate the date spine. There is logic in place to use either the lead or opportunity sources when generating the min date in the spine. However, this same conditional is not also used for the end date logic.

This usually will not be an issue if a user still has the opportunity source. However, if the opportunity source is not present then this model will fail. We should update the logic in the model to ensure it may succeed or be disabled if the opportunity model is not present in the source.

Relevant error log or model output

Compilation Error in model.salesforce.salesforce__daily_activity, caused by compilation error in referenced ephemeral model model.salesforce.int_salesforce__date_spine

Expected behavior

The model either succeeds as expected, or is disabled if the opportunity model is not present

dbt Project configurations

vars:
   salesforce__lead_enabled: true

Package versions

v1.0.0

What database are you using dbt with?

postgres, redshift, snowflake, bigquery, databricks

dbt Version

1.6.0

Additional Context

We should consider if swapping to use the lead table when the salesforce__lead_enabled is enabled is the best approach. This may not be the approach we want to take. This should be thought through and evaluated before changes are applied.

Are you willing to open a PR to help address this issue?

  • Yes.
  • Yes, but I will need assistance and will schedule time during our office hours for guidance
  • No.
@fivetran-joemarkiewicz fivetran-joemarkiewicz added bug Something isn't working type:bug Something is broken or incorrect error:forced and removed bug Something isn't working labels Feb 5, 2024
@fivetran-jamie fivetran-jamie self-assigned this Feb 14, 2024
@fivetran-jamie fivetran-jamie added status:in_progress Currently being worked on update_type:models Primary focus requires model updates update_type:documentation Primary focus requires documentation updates labels Feb 14, 2024
@fivetran-jamie
Copy link
Contributor

in v1.0.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
error:forced status:in_progress Currently being worked on type:bug Something is broken or incorrect update_type:documentation Primary focus requires documentation updates update_type:models Primary focus requires model updates
Projects
None yet
Development

No branches or pull requests

2 participants