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

update is_most_recent_record in sub history #15

Merged
merged 4 commits into from
Aug 20, 2024

Conversation

fivetran-reneeli
Copy link
Contributor

@fivetran-reneeli fivetran-reneeli commented Aug 19, 2024

PR Overview

This PR will address the following Issue/Feature: Issue #14

internal ticket where a customer was seeing a partition by constant expression issue due to a null value as the partition key resulting from having id in their source subscription_history table instead of subscription_id. To fix this we separated out the partition so that the coalesce between id and subscription_id occurred first.

This PR will result in the following new package version:

v0.3.1

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

Bugfix

  • Updates the is_most_recent_record field in stg_recharge__subscription_history to partition on id, or subscription_id if the former is not available in the source table.

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:

  • [na] 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:

Hex notebook linked in ticket!

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

💃

Copy link
Contributor

@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-reneeli Code changes look good! Suggestion for the changelog, and also left a comment in Height re the validation. Thanks!

CHANGELOG.md Outdated
# dbt_recharge_source v0.3.1
[PR #15](https://github.com/fivetran/dbt_recharge_source/pull/15) includes the following updates:
## Bugfix
- Updates the `is_most_recent_record` field in `stg_recharge__subscription_history` to partition on `id`, or `subscription_id` if the former is not available in the source table.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would add an explanation of why this had to be done.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added!

Copy link
Contributor

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

Awesome--lgtm!

Copy link
Collaborator

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

Thanks @fivetran-reneeli for this quick fix. These changes look good to me!

@fivetran-reneeli fivetran-reneeli merged commit 94b6b76 into main Aug 20, 2024
7 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