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

Filter out deleted accounts #143

Merged
merged 6 commits into from
Oct 30, 2024
Merged

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Oct 28, 2024

PR Overview

This PR will address the following Issue/Feature: #55 in dbt_quickbooks_source

This PR will result in the following new package version: 0.16.0

We are removing deleted records, changing the transformation reporting, which requires a breaking change.

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

PR Checklist

Basic Validation

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

  • dbt run –full-refresh && dbt test
  • [NA] 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:

All integration validation tests passed.
Screenshot 2024-10-28 at 9 21 04 AM

Upstream Source Package Updates

  • Deleted records have been previously been brought into the dbt_quickbooks package. To ensure accuracy in reporting, the following updates were made in the v0.11.0 release of dbt_quickbooks_source:
  • We introduced the _fivetran_deleted field to filter out deleted records from the following staging models:
    • stg_quickbooks__account
    • stg_quickbooks__bundle
    • stg_quickbooks__customer
    • stg_quickbooks__department
    • stg_quickbooks__item
    • stg_quickbooks__vendor
  • As this will filter out deleted records that were previously being counted and we are adding a new field to these staging models, this will be a breaking change here and in dbt_quickbooks.
  • Because deleted records are now being removed from these staging tables that then flow into dbt_quickbooks reports, these are breaking changes for this package.

Documentation update

  • Added the _fivetran_deleted field to the above corresponding seed files in integration tests.

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

🧢

@fivetran-avinash fivetran-avinash self-assigned this Oct 28, 2024
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-avinash I have a changelog suggestion and also a question!

When I ran the consistency tests with seed data, I get the below failure.
Screenshot 2024-10-30 at 10 05 39 AM

When I dug into it, there was a change in the adjusted+amount.
Screenshot 2024-10-29 at 7 26 40 PM

Is this expected given the changes?

Comment on lines +4 to +12
## Upstream Source Package Updates
- Deleted records have been previously been brought into the `dbt_quickbooks` package. To ensure accuracy in reporting, the following updates were made in the [v0.11.0 release](https://github.com/fivetran/dbt_quickbooks_source/releases/tag/v0.11.0) of `dbt_quickbooks_source`:
- We introduced the `_fivetran_deleted` field to filter out deleted records from the following staging models:
- `stg_quickbooks__account`
- `stg_quickbooks__bundle`
- `stg_quickbooks__customer`
- `stg_quickbooks__department`
- `stg_quickbooks__item`
- `stg_quickbooks__vendor`
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add which end models could potentially be affected by this change? This would help customers check their data if they need to.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's impacting all models haha, so just tweaked line 13.

@fivetran-catfritz
Copy link
Contributor

@fivetran-avinash I realized I pasted the wrong screenshot yesterday. It's fixed now!

@fivetran-catfritz
Copy link
Contributor

@fivetran-avinash as we discussed the failure is expected because of the udpates and after I redid tests there is no discrepancy between warehouses. Just some minor doc updates are left!

Copy link
Contributor Author

@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 Ready for re-review!

packages.yml Outdated Show resolved Hide resolved
Comment on lines +4 to +12
## Upstream Source Package Updates
- Deleted records have been previously been brought into the `dbt_quickbooks` package. To ensure accuracy in reporting, the following updates were made in the [v0.11.0 release](https://github.com/fivetran/dbt_quickbooks_source/releases/tag/v0.11.0) of `dbt_quickbooks_source`:
- We introduced the `_fivetran_deleted` field to filter out deleted records from the following staging models:
- `stg_quickbooks__account`
- `stg_quickbooks__bundle`
- `stg_quickbooks__customer`
- `stg_quickbooks__department`
- `stg_quickbooks__item`
- `stg_quickbooks__vendor`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's impacting all models haha, so just tweaked line 13.

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-avinash Everything looks great. Approved!

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.

A few change requests before this is ready for release.

CHANGELOG.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
Copy link
Contributor Author

@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-joemarkiewicz ready for re-review!

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

packages.yml Outdated Show resolved Hide resolved
@fivetran-avinash fivetran-avinash merged commit ea05fe5 into main Oct 30, 2024
8 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