-
Notifications
You must be signed in to change notification settings - Fork 38
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
Bugfix/v0.12.5 #124
Bugfix/v0.12.5 #124
Conversation
…and last, and adding more using_payment configs downstream
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-reneeli great job working through these changes and confirming the updates work for the customer. I do have a few comments and suggestions before approving. Let me know if you have any questions. Thanks!
@@ -21,6 +21,7 @@ estimates as ( | |||
), | |||
{% endif %} | |||
|
|||
{% if var('using_payment', True) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The int_quickbooks__invoice_join
model is only used as an upstream model in the quickbooks__ap_ar_enhanced
model.
Additionally, this model is not materialized and is ephemeral in our config.
Because of this, would it make more sense to take the same approach you took for the quickbooks__ap_ar_enhanced
model and just entirely disable this model if payments are disabled? This would allow us to reduce the code changes and not run code in the customers warehouse if it is not entirely necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I think this is a good point-- There's no point in running int_quickbooks__invoice_join
if the downstream quickbooks__ap_ar_enhanced
is disabled. I added the same configs (invoice and payments enabled) to this model.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Technically, you can revert your changes from before where the specific {% if var('using_payment', True) %}
conditionals are included. Now that this model won't be run there is no need for these added conditionals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can safely use the previous code from this model, but only make the following change and that should return the desired results
{{ config(enabled=var('using_invoice') and var('using_payment', True)) }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah good point-- updated to revert and remove those original changes
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fivetran-reneeli great work on this PR! I have two final suggestions, but they don't need to hold back the approval. Once you make those final changes and regen the docs, you can open this for release review!
Let me know if you have any questions. Thanks!
@@ -21,6 +21,7 @@ estimates as ( | |||
), | |||
{% endif %} | |||
|
|||
{% if var('using_payment', True) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Technically, you can revert your changes from before where the specific {% if var('using_payment', True) %}
conditionals are included. Now that this model won't be run there is no need for these added conditionals.
@@ -21,6 +21,7 @@ estimates as ( | |||
), | |||
{% endif %} | |||
|
|||
{% if var('using_payment', True) %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can safely use the previous code from this model, but only make the following change and that should return the desired results
{{ config(enabled=var('using_invoice') and var('using_payment', True)) }}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See the above comment for approval notes
Co-authored-by: Joe Markiewicz <74217849+fivetran-joemarkiewicz@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks great! just some doc-related comments around deprecating calendar_date
CHANGELOG.md
Outdated
- Corrects the misspelled `customer_vendor_webiste` to `customer_vendor_website` in `quickbooks__ap_ar_enhanced`. | ||
|
||
## Bug Fixes | ||
- Updates the [quickbooks__profit_and_loss](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__profit_and_loss.sql) and [quickbooks__balance_sheet](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__balance_sheet.sql) models to include both `period_first_day` and `period_last_day`. This allows users to have greater flexibility in choosing which date to aggregate records upon. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a bug fix or feature update?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also are we intending on deprecating calendar_date
? if so, maybe we should mention it here (and maybe in calendar_date
's yml description) and recommend using one of the new fields instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @fivetran-jamie , moved that to its own feature update section and added the deprecation notice for calendar_date
:
"This is slated to be deprecated, and the fields period_first_day
and period_last_day
are both offered as replacements, depending on how your company performs their financial reporting."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that sounds great! do you have the feature_update section added locally?
@@ -8,6 +8,8 @@ with general_ledger_by_period as ( | |||
final as ( | |||
select | |||
period_first_day as calendar_date, | |||
period_first_day, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe we should note here as well in a comment that calendar_date will be deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point! added
@@ -8,6 +8,8 @@ with general_ledger_by_period as ( | |||
final as ( | |||
select | |||
period_first_day as calendar_date, | |||
period_first_day, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same comment as above
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added
Co-authored-by: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com>
@@ -7,7 +7,7 @@ with general_ledger_by_period as ( | |||
|
|||
final as ( | |||
select | |||
period_first_day as calendar_date, | |||
period_first_day as calendar_date, -- Slated to be deprecated; we recommend using `period_first_day` or `period_last_day` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just noticed that period_first_day and period_last_day aren't included in the quickbooks__profit_and_loss SQL even though the yml definition says the columns exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah @sbrudz you're right, this was mistakenly removed during the PR. We will have this fix ready first thing next week!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @sbrudz for catching this, the package has been updated!
PR Overview
This PR will address the following Issue/Feature:
#122
#80
Zendesk ticket 200711
This PR will result in the following new package version:
v0.13.0
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
🚨 Breaking Changes 🚨:
PR #124 includes the following updates:
Bug Fixes
using_payments
config. Previously, this model would fail if thepayment
or thepayment_line
source tables did not exist.using_payments
enabled in order to run, otherwise the model is limited in its use.period_first_day
andperiod_last_day
. This allows users to have greater optionality in choosing which date to aggregate records upon.amount
in int_quickbooks__invoice_double_entry to useinvoice.total_amount
only on the condition there existsbundle_id
andtotal_amount = 0
, otherwise useinvoice_lines.amount
. This avoids double counting when aggregating invoice_line items and accounts for the edge cases where a bundle_id is involved.PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
amount
update worksusing_payments
config to select models, and this was validated by running with the following vars enabled/disabled:If you had to summarize this PR in an emoji, which would it be?
💃