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/too-many-partitions #131

Merged
merged 16 commits into from
Oct 16, 2024
Merged

bug/too-many-partitions #131

merged 16 commits into from
Oct 16, 2024

Conversation

fivetran-catfritz
Copy link
Contributor

@fivetran-catfritz fivetran-catfritz commented Oct 7, 2024

PR Overview

This PR will address the following Issue/Feature:

  • internal ticket

This PR will result in the following new package version:

  • v0.18.0 - we will be adjusting partitions requires a full refresh to prevent failures.

Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:

Breaking Changes

Since the following changes are breaking, a --full-refresh after upgrading will be required.

  • Changed the partitioning from days to weeks in the following models for BigQuery and Databricks All Purpose Cluster destinations:
    • int_jira__issue_calendar_spine
    • int_jira__pivot_daily_field_history
    • jira__daily_issue_field_history
  • This adjustment reduces the total number of partitions, helping avoid partition limit issues in certain warehouses.
  • For Databricks All Purpose Cluster destinations, updated the file_format to delta for improved performance.

Under the Hood

  • Updated model int_jira__issue_calendar_spine to prevent errors during compilation.
  • Added consistency and integrity tests for model jira__daily_issue_field_history.

PR Checklist

Basic Validation

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

  • dbt run –full-refresh && dbt test
  • dbt run (if incremental models are present) && dbt test

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

  • The appropriate issue has been linked, tagged, and properly assigned
  • All necessary documentation and version upgrades have been applied
  • docs were regenerated (unless this PR does not include any code or yml updates)
  • BuildKite integration tests are passing
  • Detailed validation steps have been provided below

Detailed Validation

Please share any and all of your validation steps:

Full Refresh
Screenshot 2024-10-08 at 1 06 51 PM

Incremental Run
Screenshot 2024-10-08 at 1 06 30 PM

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

💃

@fivetran-catfritz fivetran-catfritz self-assigned this Oct 7, 2024
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-catfritz great work on these updates. I checked the run in a few different scenarios as well as with the validation tests on both full refresh and incremental versions and this is looking great!

I do have a few documentation change requests before this will be ready for approval. Let me know once those are applied and the docs regenerated and this should be ready for approval and release review.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
models/jira__daily_issue_field_history.sql Show resolved Hide resolved
Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

@fivetran-joemarkiewicz Thank you for the review! I made the updates and also regenerated docs. I will do the final incremental run on Wednesday for final approval.

CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Show resolved Hide resolved
models/jira__daily_issue_field_history.sql 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.

LGTM!

CHANGELOG.md Outdated Show resolved Hide resolved
@@ -15,7 +15,7 @@

{% if is_incremental() %}
-- set max date_day with lookback as a variable for multiple uses
{% set max_date_day = jira.jira_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) %}
{% set max_date_week = jira.jira_lookback(from_date='max(date_week)', datepart='week', interval=var('lookback_window', 1)) %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to update the lookback window README section (and thus the CHANGELOG) that the default is now 1 week rather than 3 days? Or is it just for specific cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good catch--definitely yes. I have updated!

Copy link
Contributor

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-catfritz Great job! A few comments before release.

Copy link
Contributor Author

@fivetran-catfritz fivetran-catfritz left a comment

Choose a reason for hiding this comment

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

Thank you @fivetran-avinash! I have updated from your comments, so it's ready for review.

@@ -15,7 +15,7 @@

{% if is_incremental() %}
-- set max date_day with lookback as a variable for multiple uses
{% set max_date_day = jira.jira_lookback(from_date='max(date_day)', datepart='day', interval=var('lookback_window', 3)) %}
{% set max_date_week = jira.jira_lookback(from_date='max(date_week)', datepart='week', interval=var('lookback_window', 1)) %}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very good catch--definitely yes. I have updated!

CHANGELOG.md Outdated Show resolved Hide resolved
Copy link
Contributor

@fivetran-avinash fivetran-avinash left a comment

Choose a reason for hiding this comment

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

@fivetran-catfritz Nice! Whenever Buildkite starts passing, lgtm!

The only additional suggestion I have is to add a "Documentation Update" section to link to the new README updates so it's easy for users to see the new Lookback Window section.

@fivetran-catfritz fivetran-catfritz merged commit 9474332 into main Oct 16, 2024
9 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.

3 participants