-
Notifications
You must be signed in to change notification settings - Fork 29
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 - SLA policies model failling uniqueness test #66
Comments
Hi @james-smith-bbm thanks so much for raising this issue and bringing the test failure to our attention. 👀 The code you pointed out is exactly where this duplication is happening. We originally added this join condition to help capture the However, as we can see from the failure in the test, this clearly is not working for all instances. I wasn't the biggest fan of this solution originally and believe there is a better way to keep the original logic we had previously while also capturing the My first thought is to not leverage the Would you be able to try the below working branch as a dependency and let me know if you see the issue persist? packages:
- git: https://github.com/fivetran/dbt_zendesk.git
revision: bugfix/sla_duplicates
warn-unpinned: false |
Hi @fivetran-joemarkiewicz, thanks for taking a look and confirming it's in hand. I tried that branch, and was able to In the meantime, I have solved my immediate issue by downgrading to v0.7.0. |
Hi @james-smith-bbm thanks so much for validating this issue is resolved on your end in the working branch. In the meantime, I will open a PR for this and ensure the fix will be integrated into the next Feel free to follow this issue until release and thanks again for raising this issue with us! |
Just wanted to provide an update here that the PR mentioned above will be reviewed during my teams next sprint (starting 3/9) and should be expected to be integrated into the next release following PR approval. |
Closing this as the latest release is now live. |
Is there an existing issue for this?
Describe the issue
I recently upgraded from v0.5.2 to v0.7.1 of the Zendesk package, and have successfully done a full refresh
dbt run
of all zendesk models since. I now receive adbt test
failure, saying that thesla_event_id
column in thesla_policies
model is not unique.I have debugged this as best I can myself. The issue seems to be caused by a change introduced in v0.7.1 (absent from v0.7.0, still present in v0.8.0).
v0.7.0 has this join condition in the
int_zendesk__sla_policy_applied
model:and sla_policy_applied.sla_applied_at >= sla_policy_name.valid_starting_at
Since v0.7.1, it has been changed to this:
and sla_policy_applied.sla_applied_at >= {{ fivetran_utils.timestamp_add(datepart='second', interval='-5', from_timestamp='sla_policy_name.valid_starting_at') }}
Relaxing the join condition in this way causes duplication in the join, and ultimately in the final model output, as indicated by the unque test fail.
Relevant error log or model output
Expected behavior
Successful
dbt test
, as was happening under v0.5.2.dbt Project configurations
Package versions
What database are you using dbt with?
bigquery
dbt Version
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: