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

Add service end models #123

Merged
merged 24 commits into from
Oct 30, 2023
Merged

Add service end models #123

merged 24 commits into from
Oct 30, 2023

Conversation

fivetran-jamie
Copy link
Collaborator

@fivetran-jamie fivetran-jamie commented Oct 25, 2023

PR Overview

This PR will address the following Issue/Feature:
Quarterly project to add service/ticket models

This PR will result in the following new package version:

breaking: v0.14.0
non-breaking: v0.13.1

for users who have not explicitly set hubspot__service_enabled to true, nothing will change (besides the tiny source package patch i added)

for users who have hubspot__service_enabled set to true, a lot will change!! they'll have two new end models, one of which is a pretty hefty incremental model with incremental intermediate models. that's probably something a user should explicitly elect to have so...breaking?

Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:

PR Checklist

Basic Validation

Please acknowledge that you have successfully performed the following commands locally:

  • dbt compile
  • dbt run –full-refresh
  • dbt run
  • dbt test
  • dbt run –vars (if applicable)

Before marking this PR as "ready for review" the following have been applied:

  • The appropriate issue has been linked and tagged
  • You are assigned to the corresponding issue and this PR
  • BuildKite integration tests are passing

Detailed Validation

Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":

  • You have validated these changes and assure this PR will address the respective Issue/Feature.
  • You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
  • You have provided details below around the validation steps performed to gain confidence in these changes.

for ticket history
looked at our available dataset and compared ticket changes in the source ticket_property_history table to the end model.

for ticket enhanced model
this one was fairly straightforward, as my code is basically just dynamic joins and a call to the pre-existing engagements_aggregated macro

for more details see slack DM

Standard Updates

Please acknowledge that your PR contains the following standard updates:

  • Package versioning has been appropriately indexed in the following locations:
    • indexed within dbt_project.yml
    • indexed within integration_tests/dbt_project.yml
  • CHANGELOG has individual entries for each respective change in this PR
  • README updates have been applied (if applicable)
  • DECISIONLOG updates have been updated (if applicable)
  • Appropriate yml documentation has been added (if applicable)

dbt Docs

Please acknowledge that after the above were all completed the below were applied to your branch:

  • docs were regenerated (unless this PR does not include any code or yml updates)

If you had to summarize this PR in an emoji, which would it be?

🎃

@fivetran-jamie fivetran-jamie self-assigned this Oct 25, 2023
@fivetran-jamie fivetran-jamie marked this pull request as ready for review October 26, 2023 17:51
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie this PR looks great and I appreciate how you were able to leverage what we have already done in Jira to repurpose here! It was very easy to review because it was similar to my understanding of Jira and I can see this being an asset to our customers using the Service Hub feature in HubSpot.

In addition to my minor comments in the code, I have one major question when it comes to the ticket_state. I feel this will be one of the most important property history values that customers will want to see day over day as it resembles the status of the ticket (correct me if I am wrong). One thing that confused me was this ticket_state seemed to be inconsistent with the actual state of the ticket. For example, I saw for one ticket it was only opened for 4 days and your ticket daily history model produced only 4 records (great!). However, the ticket_state for last day was still OPEN? I see that we grab the state from the pipeline stage. Is this the only way to grab the state of the ticket? It may be a nuance of HubSpot and not something we can account for, but it did seem confusing during my review. What are your thoughts?

Other than that, I was able to test the variables and various incremental runs and all looks great! Once the comments here are addressed, this should be good to go!

models/service/hubspot__tickets.sql Outdated Show resolved Hide resolved
models/service/hubspot__tickets.sql Outdated Show resolved Hide resolved
models/service/hubspot__daily_ticket_history.sql Outdated Show resolved Hide resolved
Copy link
Contributor

@fivetran-joemarkiewicz fivetran-joemarkiewicz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fivetran-jamie these changes look great! Thanks for working through these 😄 I just have one last update below. After that this is good to go!

I am approving this PR but be sure to merge PR #122 into this one before regenerating the docs and preparing for release. Thanks again!

models/service/service.yml Outdated Show resolved Hide resolved
@fivetran-jamie fivetran-jamie merged commit 6b1900d into main Oct 30, 2023
1 of 2 checks passed
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.

2 participants