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

Calendar spine optimizations #114

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Jan 9, 2024

PR Overview

This PR will address the following Issue/Feature: [#111]

This PR will result in the following new package version:

Breaking as we are changing the incremental logic.

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

🚨 Breaking Changes 🚨

  • Refactored int_jira__issue_calendar_spine to reduce computational load and ensure proper incremental runs.
  • Created the int_jira__calendar_spine to move the calendar spine into its own model. That is then joined into the issue calendar spine.
  • Moved the issue_dates CTE join into int_jira__field_history_scd to avoid loading all the issue lines within the issue calendar spine on incremental loads.
  • Updated and added incremental logic in both int_jira__issue_calendar_spine and jira__daily_issue_field_history to filter and insert records based on the issues present in the respective models.

🚘 Under the Hood 🚘

  • Updated jira__daily_issue_field_history to exclude the created_on and open_until fields from the pivoted field operations in this model. These fields were created from the issue_dates CTE and are only needed for the int_jira__issue_calendar_spine.

📜 Documentation Updates 📜

  • Updated the README (see the Extend the history of an issue past its closing date section in Additional Configurations) with an explanation for what the jira_issue_history_buffer does in int_jira__issue_calendar_spine.

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
  • [NA] 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.

Applying these changes brought in the new fields in significantly reduced runtime on an incremental dbt run.

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)
  • [NA] DECISIONLOG updates have been updated (if applicable)
  • [NA] 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?

📆

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.

document jira_issue_history_buffer variable int_jira__issue_calendar_spine performs slowly on snowflake
2 participants