-
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 policy events failing due to duplicate values #144
Comments
Hi @mark-ogrady thanks for raising this issue. We actually have seen a few issues pop up recently around the SLA policies table and I believe we may have a workaround. Would you be able to test the following WIP version of the package and let me know if you still see duplicates after using this version of the package: packages:
- git: https://github.com/fivetran/dbt_zendesk.git
revision: bugfix/sla-investigations
warn-unpinned: false |
Thanks Joe, Quick correction to the above: I managed to run this version, but the model failed in the dbt run stage, I got this Bigquery specific error:
Suggests there might be some issue with one of the joins in the SLA table perhaps? |
Hey @mark-ogrady ! I think you might be right, but we'll need to do some further investigating to confirm this. We'll get back to you next week! |
Hi @mark-ogrady, would you be able to test this branch again? We made some updates to the underlying logic within the branch that we believe will mitigate the computational query load you faced last time. Let us know how it goes! |
Hi Avinash, Thanks - I am no longer getting a resource error, but have gone back to the failing test:
Is there any information I can get for you that will help further identify the error? |
Hi @mark-ogrady, could you share a few examples of duplicate records that are failing? If you could grab them from the end model and any source data with these records, we can try and locally reproduce the error and figure out where the issue is coming from. |
Hi @fivetran-avinash! I'm actually running into this issue as well after making the switch to The duplicate events have the exact same values except for |
Hi @mark-ogrady ! What are the |
Hey @fivetran-avinash ! I hope I’m not taking away from @mark-ogrady's ticket but I can add some information from my instance. The |
Hi @nbdaniels , thanks for your contributions! It is interesting that you are only seeing these duplicates in one week of the SLA. I am wondering if it has to do with daylight savings time, as the week the SLAs were applied were the week before DST started in 2023. Before we dive deeper, we want to make sure there is no issue in your source data. Can you run this query on tickets where you are seeing duplicate SLA values in the source? We just want to confirm this before we investigate within the package.
@mark-ogrady, also feel free to run this query too for where you are seeing SLA policy test duplicates! |
Hi @fivetran-avinash! Sorry for the delay here, I totally missed this notification. I've run the above query for all duplicate SLA policies:
There are a handful of these tickets that have multiple rows for applying Please let me know if I can run anything else on my end! |
Hi @nbdaniels thank you giving that a run! Would you also be able to share the results of this query: select *
from <schema>.int_zendesk__reply_time_combined
where ticket_id = <ticket_id> This way we can see the records in the intermediate model that are coming through and resulting in duplicates. From there we can work to make the proper adjustments! |
Hi @fivetran-catfritz! Sorry I completely missed this! Just ran the query and will share some non-sensitive information. High-level: It looks like differing schedules start / end times may be causing this issue.
If you need example CSVs or any other details, please let me know and we can figure out the best way to send over some information. |
Hi @nbdaniels thank you for giving that a run! It does seem that your findings align with the daylight savings issue, but it would indeed be beneficial if you could provide CSV files containing the duplicate rows. We'd like to check out the differing schedules and sample tickets with the duplicates. You can email the CSVs to us at solutions@fivetran.com, referencing this ticket. Alternatively, you could initiate a data share with us, since we also use BigQuery, so let me know if you prefer to go that route! |
We are facing the same issue, and it seems also related to daylight saving time as all duplicates occur around these dates. @fivetran-catfritz Let me know if you need any more examples around the issue. |
@fivetran-catfritz Apologies again for the delay! I just emailed a CSV over to solutions@fivetran.com but please let me know if I can provide anything else in the meantime! |
Thank you @nbdaniels! I confirm we received it and will take a look soon. @laurits-inpay If you would also be willing to share an output sample of the below query, that would be helpful. You can send it to solutions@fivetran.com or let me know if you prefer to do a data share if you use Snowflake or Bigquery.
|
Hey everyone! We'll be taking this on in our current sprint. Thanks for the data shares which will help tremendously! We'll post in this thread with any questions/updates. |
Hi all, we made changes in this following branch and invite you to test it out. Please let us know if this tackles the issue of duplicate sla event ids!
|
@fivetran-reneeli I apologize for the delay! I was OOO but I am testing this week. Thank you for making the changes and I'll let you know if we run into any issues! |
@fivetran-reneeli It looks like we're still hitting the error when pulling from the branch you mentioned. Please see below:
Please let me know if I can provide any other details or data examples! |
Hi all,
and the same test still fails, somehow it creates duplicate surrogate keys, We really appreciate if the fix can go out sooner as this is causing all our dbt runs get marked as failed. |
Hi @solmazb thanks for chiming in and sharing that you are also experiencing this issue. Unfortunately we do not have a fix available at the moment. The branch we shared above does not seem to accurately address the duplication issue. We are struggling to find/apply a fix as we are unable to recreate the duplication issue which seems to be occurring during daylight saving schedule changes. @laurits-inpay and others in this thread have been helpful with sharing information around how the issue may be occurring. From this we have been able to identify that the duplication seems to be originating from the int_zendesk__reply_time_combined model; however, we are still unable to accurately recreate the issue and identify a fix at this moment. If you would be available, it would be incredibly helpful to discuss live the duplicates you are seeing. This way we may possibly be able to understand the source of the duplication further. If you are interested in discussing live, feel free to schedule some time when we are both available. Thanks! |
Hi @fivetran-joemarkiewicz ! Sorry for the delay here -- I've been OOO and just getting back to this work. I'll set up some time at that link and we should be able to dig in live! |
Hi all, thanks for the patience and again we really appreciate you working with us to help address these duplicates!
We are aware that there are still a few duplicates remaining which we have whittled down to the following:
|
Hi Guys,
with details as follows:
I've obvsly run the sql and I am getting 68 duplicated event ids all with count value 2. Let me know if with my limited knowledge, but quite large Zendesk data source I can help - do something to help you testing. Cheers |
Hey @TomaszE! Thanks for the message-- We are actually releasing the remainder of the fixes today! In the meantime, you can also feel free to test with the branch that we will be merging.
|
Is there an existing issue for this?
Describe the issue
I am getting a failed test on the sla policies table. Out of about 50,000 records in the final table, 100 are showing duplicate IDs.
I am not that familiar with the Zendesk data - is there a source table that could be causing these duplicate records?
Relevant error log or model output
The text was updated successfully, but these errors were encountered: