-
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
Feature/add department #82
Feature/add department #82
Conversation
…nt_id Adds department id to general ledger
Release/v0.8.0
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.
Just need to make some minor updates but should be good to go after the updates!
@@ -1,11 +1,11 @@ | |||
id,_fivetran_deleted,_fivetran_synced,balance,created_at,currency_id,department_id,doc_number,due_date,exchange_rate,global_tax_calculation,home_balance,payable_account_id,private_note,sales_term_id,sync_token,total_amount,transaction_date,updated_at,vendor_id |
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.
Already taken care of, but just for reference, commented that source seed files should also be updated but taken care of!
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.
Source updated! Thanks for calling out.
@@ -1,3 +1,6 @@ | |||
packages: | |||
- package: fivetran/quickbooks_source | |||
version: [">=0.7.0", "<0.8.0"] |
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.
going to be some merge conflicts here regardless, but I imagine they'll be resolved on the merged branch =P
Co-authored-by: Avinash Kunnath <[email protected]>
Co-authored-by: Avinash Kunnath <[email protected]>
PR Overview
This PR will address the following Issue/Feature: PR #63 slight modifications to account for merge conlicts
This PR will result in the following new package version:
v0.9.0
While this won't particularly be a breaking change, this will be integrated with other breaking changes.
Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:
This PR includes the
department_id
into the double entry models and also the downstream General Ledger Model. Thedepartment_id
was added at the header (not line item) level for all double entry models with the exception of transfer, payment, credit_card_payment (no department_id included in the header or line item for the previous three models), and the journal entry (department_id only existed in the line item).Since the initial customer PR did not include the
department_id
in thequickbooks__general_ledger_by_period
and other downstream models, I intentionally did not include this field in the other downstream models. Reason being is because during the introduction of theclass_id
in a previous PR we found that the partitioning would cause duplicate records following the aggregation since the line item level is sometimes used to produce the foreign key. In this case, since journal_entry uses the line item level, this will result in duplicate records for a single account with the department_id in the aggregated downstream models. As such, I would prefer to leave this field out of the downstream models for the time being.However, if customers show desire to include this field in the aggregated end models then we can move forward with that approach and look to PR #77 for the updates needed to ensure the duplicates are accounted for.
PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
quickbooks__general_ledger
model needing to be generated prior to the date spine. There is no easy way around this since we cannot look up this information at the source level. It is out of scope to address in this PR, but a feature request (Issue [Feature] dbt compile does not work on new schema #83) to explore this further has been opened to investigate on its own time.Before marking this PR as “ready for review” the following have been applied:
Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as “ready for review”:
This was validated to ensure there were no fan out cases similar to what we experienced with the addition of the
class_id
. I was able to test the current live version (v0.8.1) and the changes from this update branch locally with data and found that no results returned (expected). This is evidence that the department_id does not need to be included in the partitions and will aggregate without risk of fan out or miscalculation. This mainly did not cause duplicates as we do not account for the department_id in the aggregated end models. See the query used to validate this below.Standard Updates
Please acknowledge that your PR contains the following standard updates:
dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
If you had to summarize this PR in an emoji, which would it be?
🏬