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] All 'business minutes' fields don't take into account the schedule_holiday table #92

Closed
2 of 4 tasks
harrywise64 opened this issue Mar 17, 2023 · 8 comments
Closed
2 of 4 tasks
Assignees
Labels
priority:p3 Affects many users; can wait status:in_progress Currently being worked on type:enhancement New functionality or enhancement update_type:models Primary focus requires model updates

Comments

@harrywise64
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Describe the issue

Hi, I previously had an open ticket with Prasadu (#129459) but he suggested I make another one as he does not deal with the DBT package side of support - hopefully this can reach the right person!

Our issue is that we use the Zendesk Fivetran DBT package shown here: https://hub.getdbt.com/fivetran/zendesk/latest/

It calculates the logic to provide business minutes (e.g. First Resolution Time in Business Minutes) - and I can see the logic given in the package in the interim tables (e.g. int_zendesk__ticket_first_resolution-time_business.sql). Our problem is that this calculation does not take into account holidays.

The holiday logic is available in the schedule_holiday table from Zendesk, and we update this for our own holidays, but it is not taken into account when calculating these columns.

Please can you update the package to correct this logic and use the holiday schedule to calculate time to resolution

Thanks,

Harry

Relevant error log or model output

Mentioned above, but much longer 'Time to First Resolution Business Minutes' is much longer around public holidays like Christmas, which we factor into schedule_holiday but does not feature in the code that calculates these metrics.

Expected behavior

Expect business minutes to take into account holiday schedules. They're much longer over christmas time as it assumes people working over holidays!

dbt Project configurations

name: 'qogita_analytics'
version: '1.4.0'
config-version: 2

Package versions

packages:
- package: fivetran/zendesk
version: [">=0.8.0", "<0.9.0"]

  • package: dbt-labs/segment
    version: 0.8.1
  • package: fivetran/lever
    version: 0.4.0
  • package: fivetran/google_ads
    version: [">=0.8.0", "<0.9.0"]

I have checked patch notes for newer versions and the issue seems to persist!

What database are you using dbt with?

snowflake

dbt Version

Core:

  • installed: 1.3.0
  • latest: 1.4.5 - Update available!

Your version of dbt-core is out of date!
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation

Plugins:

  • snowflake: 1.3.0 - Update available!

At least one plugin is out of date or incompatible with dbt-core.
You can find instructions for upgrading here:
https://docs.getdbt.com/docs/installation
harry@Harrys-MacBook-Air dbt-analytics %

Additional Context

No response

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.
@harrywise64 harrywise64 added the bug Something isn't working label Mar 17, 2023
@fivetran-joemarkiewicz
Copy link
Contributor

Hi @harrywise64 thanks for opening this issue and providing the additional details around the schedule_holiday table.

This table is actually not one that we have for our own data, but I do agree that in order for the schedules to match up for users using the schedule_holiday feature of Zendesk, this would need to be implemented into our logic. I will accept this issue for our upcoming sprint. My team will be able to dive in and investigate a bit more in the coming week.

We will be sure to share more details here as we work through the update. Be sure to follow this thread as we may ask a few clarifying questions and will likely share a branch with a working version before we roll it out to the next release so it can be properly tested.

Thanks!

@fivetran-joemarkiewicz fivetran-joemarkiewicz added priority:p3 Affects many users; can wait status:accepted Scoped and accepted into queue and removed bug Something isn't working labels Mar 17, 2023
@harrywise64
Copy link
Author

harrywise64 commented Mar 20, 2023 via email

@fivetran-reneeli
Copy link
Contributor

fivetran-reneeli commented Apr 18, 2023

Hi @harrywise64! We've made updates (in this branch) to account for the schedule_holiday table to the first_resolution_business_minutes and full_resolution_business_minutes fields. However we lack the data to test the validity. Could you try out the branch below if you get a chance to? You will need to update your packages yml temporarily to

packages:
  - git: https://github.com/fivetran/dbt_zendesk.git
    revision: bugfix/add_schedule_holiday
    warn-unpinned: false 

@fivetran-reneeli
Copy link
Contributor

Hi @harrywise64 , just checking in to see if this resolved the issue.

@fivetran-joemarkiewicz fivetran-joemarkiewicz added status:blocked Need additional information or requirements before proceeding and removed status:accepted Scoped and accepted into queue labels May 2, 2023
@fivetran-joemarkiewicz
Copy link
Contributor

Marking this as blocked for the time being as we are unable to fully test this functionality with our own internal data. If anyone else comes across this same issue, please feel free to comment and we can work to validate these changes and fold into the next release of the package ☺️

@harrywise64
Copy link
Author

harrywise64 commented May 2, 2023 via email

@fivetran-joemarkiewicz fivetran-joemarkiewicz self-assigned this Jun 6, 2023
@fivetran-joemarkiewicz fivetran-joemarkiewicz added type:enhancement New functionality or enhancement status:in_progress Currently being worked on update_type:models Primary focus requires model updates and removed status:blocked Need additional information or requirements before proceeding labels Jun 6, 2023
@fivetran-joemarkiewicz
Copy link
Contributor

Hi @harrywise64 and anyone else encountering the need to replicate the holiday schedules in your Zendesk metrics. We have been able to build out a new solution that should handle the holidays within the pre-existing schedules. I would encourage you to give the following branch a test to see if this resolves your initial issue.

packages:
  - git: https://github.com/fivetran/dbt_zendesk.git
    revision: bugfix/schedule-holiday-addition ## Different branch from the original one shared above
    warn-unpinned: false 

Let me know if you are able to give this a test!

@fivetran-joemarkiewicz
Copy link
Contributor

These updates have since been included in the latest v0.11.0 release of the dbt_zendesk package! This should be live on the dbt hub at the top of the hour. As such I will close this issue.

Please feel free to comment here or open a new issue if you do not see your business metrics taking into consideration the schedule holiday.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p3 Affects many users; can wait status:in_progress Currently being worked on type:enhancement New functionality or enhancement update_type:models Primary focus requires model updates
Projects
None yet
Development

No branches or pull requests

3 participants