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

Create zendesk__reply_metrics model #83

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

zhoward101
Copy link

Are you a current Fivetran customer?
Yes: Zoe Howard, Analytics Engineer @ ActBlue

What change(s) does this PR introduce?
This PR creates a new end model titled zendesk__reply_metrics. This model will fill a gap in the current end models, allowing users of the package to introspect Zendesk data at the reply granularity, not just at the ticket level.

It is so important to have this capacity because as it exists right now if you are trying to break down metrics such as time to first reply by responding agent, the only way to do that is by the agent currently assigned to a ticket. Since a ticket could have multiple agents assigned to it over the course of its lifetime, this is not always an accurate reflection of that agent's performance.

Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

  • Yes, Issue/Feature [link bug/feature number here]
  • No

How did you test the PR changes?

  • CircleCi
  • Local (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

🌴

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

@fivetran-joemarkiewicz
Copy link
Contributor

Hi @zhoward101 thanks so much for opening this PR! Someone from my team will review and let you know if there is any feedback once our next sprint (starting 11/3) kicks off 😄

@fivetran-avinash
Copy link
Contributor

fivetran-avinash commented Nov 21, 2022

Hello @zhoward101 ! Thanks for contributing to the Zendesk package and thanks for your patience!

I reviewed your logic and everything looks solid! I made a few refactors of the code to make it easier to run on the end model. We tend to do our more complex calculations in intermediate models to reduce load and simplify readability of the final models, so I created an intermediate model with most of the complex CTE functions and then joined in the user table on that in the reply_metrics end model.

You can see what the changes look like here--I might recommend creating these new models on your own branch and testing to see if the data looks the same on your end, just in case: https://github.com/fivetran/dbt_zendesk/compare/zendesk-replies-model-refactor

Let me know if everything looks good!

@zhoward101
Copy link
Author

@fivetran-avinash Sorry for my lack of movement on this PR. I have a couple addition updates from troubleshooting with my team that I'd like to add in within the next few week.

@zhoward101
Copy link
Author

Updates to the new zendesk__reply_model based on troubleshooting are now here! The problem with how it was structured before is that since tickets can have multiple agent replies between end user comments, using the min(agent_comments.user_id) as responding_agent_user_id approach caused the incorrect user to be associated with the first rely in those scenarios

@fivetran-avinash
Copy link
Contributor

Thanks for putting all these updates together @zhoward101, looks pretty thorough!

Currently our team is in the middle of a work sprint, but we'll take a look at your changes in an upcoming sprint and give you our thoughts as soon as possible and try and get this ready for merging!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants