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

Feature: add deleted groups #36

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

Conversation

EstelleBarnoud
Copy link

Are you a current Fivetran customer?

Yes, part of dbt Labs internal analytics team!

What change(s) does this PR introduce?

Enable historical modeling: updated the stg_zendesk__group model to keep deleted groups. Added is_deleted tag to enable filtering in downstream models.

Use case: building a historical model of each ticket states at each field update. Would need to override the package model to get group name for historical tickets with deleted groups:
image

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.)

The stg_zendesk__group is a usually small table and is only ever used to join in group names to other downstream models in the fivetran/zendesk package. This means models will only be enriched better downstream for historical tickets.

Note: the is_deleted tag can be used by teams to filter out outdated records in models outside of these packages, but leaving as is is non breaking.

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?

  • Buildkite
  • Local (please provide additional testing details below)
    Installed fivetran/zendesk package (team is only using fivetran/zendesk_source) & build all package models:
dbt build -s zendesk_source zendesk

Results:
Screen Shot 2023-04-20 at 12 06 11 PM

Validation on project: test is now passing
image

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 @EstelleBarnoud thanks so much for opening this feature request and providing the context as to why you would like to include the deleted records for historical modeling. My main concern is if these deleted records could possibly have the same group_id as an existing group. I want to confirm that the downstream joins in the dbt_zendesk package would not result in duplicates if we remove the filter that currently exists in the staging model. If not, then I think it would be relevant to include these deleted records in the downstream joins as it would help paint a proper historical picture.

Would you be able to confirm that you do not see duplicate ids in your data? In the meantime I will confirm this with our product team to get further confidence.

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