[Bug] Date spine model is inconsistent when selecting opportunity and lead for min/max #47
Closed
1 of 4 tasks
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
Is there an existing issue for this?
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
oropportunity
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 theopportunity
model is not present in the source.Relevant error log or model output
Expected behavior
The model either succeeds as expected, or is disabled if the
opportunity
model is not presentdbt Project configurations
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 thesalesforce__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?
The text was updated successfully, but these errors were encountered: