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

Add created_at and updated_at fields #146

Merged
merged 7 commits into from
Nov 26, 2024

Conversation

fivetran-avinash
Copy link
Contributor

@fivetran-avinash fivetran-avinash commented Nov 18, 2024

PR Overview

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

This PR will result in the following new package version: v0.17.0

Although this should not impact the existing fields, the general ledger model now is different, so I decided to bump it up. I'm open to moving it back down to 0.16.1 if we don't feel the change is significant enough.

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

Feature Updates

  • We have introduced the following fields in the quickbooks__general_ledger.
    • created_at: The time a transaction was first created.
    • updated_at: The time a transaction was last updated.
    • This required updates to all our double entry transaction models to bring in these specific fields for each transaction type.
  • This isn't necessarily a breaking change, but as this is a new version of this model that introduces new fields, we determined it was best to bump the version up.

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:

Confirmed that created_at and updated_at are brought into the general ledger model.

Validation tests passed with integration tests seed data.

Screenshot 2024-11-20 at 7 35 55 AM

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

@fivetran-avinash fivetran-avinash self-assigned this Nov 20, 2024
@fivetran-avinash fivetran-avinash marked this pull request as ready for review November 20, 2024 16:21
@fivetran-avinash fivetran-avinash changed the title Add created at and updated at fields Add created_at and updated_at fields Nov 20, 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-avinash this is looking great! I just have a few small requests and one small question before approving.

CHANGELOG.md Outdated
- `created_at`: The time a transaction was first created.
- `updated_at`: The time a transaction was last updated.
- This required updates to all our double entry transaction models to bring in these specific fields for each transaction type.
- This isn't necessarily a breaking change, but as this introduces new fields to an end model, we determined it was best to bump the version up.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is an unnecessary bullet in the CHANGELOG. Let's remove it as this really doesn't pertain to the customer.

Suggested change
- This isn't necessarily a breaking change, but as this introduces new fields to an end model, we determined it was best to bump the version up.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed

README.md Show resolved Hide resolved
packages.yml Outdated Show resolved Hide resolved
@@ -1,6 +1,6 @@
name: 'quickbooks_integration_tests'

version: '0.16.0'
version: '0.17.0'
Copy link
Contributor

Choose a reason for hiding this comment

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

Not related to this change, but why do we specify the materialization of so many specific types of models in the models section? I worry we could be masking errors by changing the materialization of the default package.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This must be an artifact from testing on seed data. Removing from the actual model.

packages.yml 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 This is 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

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 a couple comments/questions!

CHANGELOG.md Outdated
[PR #146](https://github.com/fivetran/dbt_quickbooks/pull/146) introduces the following updates:

## Breaking Changes
- We have introduced the following fields in the `quickbooks__general_ledger` to better analyze real-time transaction data:
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- We have introduced the following fields in the `quickbooks__general_ledger` to better analyze real-time transaction data:
- Introduced the following fields in the `quickbooks__general_ledger` model to better analyze real-time transaction data:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Committed!

CHANGELOG.md Outdated
- `created_at`: The time a transaction was first created.
- `updated_at`: The time a transaction was last updated.
- This required updates to all our double entry transaction models to bring in these specific fields for each transaction type.
- This is a breaking change as this adds new fields to the existing schema for one of our end models.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- This is a breaking change as this adds new fields to the existing schema for one of our end models.
- This is a breaking change as this adds new fields to the existing schema.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed.

CHANGELOG.md Outdated
- We have introduced the following fields in the `quickbooks__general_ledger` to better analyze real-time transaction data:
- `created_at`: The time a transaction was first created.
- `updated_at`: The time a transaction was last updated.
- This required updates to all our double entry transaction models to bring in these specific fields for each transaction type.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- This required updates to all our double entry transaction models to bring in these specific fields for each transaction type.
- Updated the `*_double_entry` models to add these fields for each transaction type.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated.

Comment on lines +7 to +17
revenue_starter as (

select
period_first_day,
source_relation,
sum(case when account_class = 'Revenue' then period_net_change else 0 end) as revenue_net_change,
sum(case when account_class = 'Revenue' then period_net_converted_change else 0 end) as revenue_net_converted_change,
sum(case when account_class = 'Expense' then period_net_change else 0 end) as expense_net_change,
sum(case when account_class = 'Expense' then period_net_converted_change else 0 end) as expense_net_converted_change
sum(period_net_change) as revenue_net_change,
sum(period_net_converted_change) as revenue_net_converted_change
from general_ledger_balances

where account_class = 'Revenue'

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 explain these changes in the changelog? It's just not obviously related to the created/update_at if it's part of those changes.

Copy link
Contributor Author

@fivetran-avinash fivetran-avinash Nov 25, 2024

Choose a reason for hiding this comment

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

Good call out. These changes are from the pre-release of this package that went out last week, but is not currently live to customers in an actual release. However this was accidentally merged to main, instead of onto its own branch.

So I'm not certain if we should call out changes that aren't live in our latest release, since to their eyes, nothing will change, even if there are changes currently contained in main itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it. I'll leave it to your judgement!

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 Addressed your comments!

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 fivetran-avinash merged commit c57a9c2 into main Nov 26, 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