PR #199 includes the following updates:
- With variable configuration now available in Quickstart, the
quickbooks__home_currencyvariable from the v1.1.1-a2 pre-release is now available across all 13 intermediate double-entry transaction models to optimize multi-currency handling. When the variable is set, transactions in the designated home currency will not apply exchange rate conversions onconverted_amount, improving accuracy. When left empty, all transactions will see exchange rate conversions applied PR #197.- Updates the README with instructions for configuring the
quickbooks__home_currencyvariable.
- Updates the README with instructions for configuring the
- Applies fixes in
int_quickbooks__sales_receipt_double_entrymodel to correctly referencequickbooks__global_tax_account_referenceandquickbooks__sales_tax_account_referencevariables PR #197. - Introduces the
partition_by_source_relationmacro to conditionally includesource_relationin window function PARTITION BY clauses only when multiple sources are configured via thequickbooks_union_schemasandquickbooks_union_databasesvariables. This resolves partition by constant expression errors on Redshift. See the README on how to leverage these variables PR #198.
- Changes default
quickbooks__home_currencyvalue to empty string for easier understanding within Quickstart UI PR #197.
PR #197 is a pre-release that includes the following updates:
- With variable configuration now available on Quickstart, we can now introduce the
quickbooks__home_currencyvariable for full release from the v1.1.1-a2 pre-release across all 13 intermediate double-entry transaction models to optimize multicurrency handling. When set, transactions already set in their home currency will not apply exchange rate conversions onconverted_amount, improving accuracy. When left empty, all transactions will see exchange rate conversions applied.- Updates the README with instructions for configuring the
quickbooks__home_currencyvariable.
- Updates the README with instructions for configuring the
- Applies fixes in
int_quickbooks__sales_receipt_double_entrymodel to correctly referencequickbooks__global_tax_account_referenceandquickbooks__sales_tax_account_referencevariables.
- Changes default
quickbooks__home_currencyvalue to empty string for easier understanding within Quickstart UI.
PR #196 includes the following updates:
1 total change β’ 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
quickbooks__general_ledger |
running_balance and running_converted_balance logic update |
Window function ordered by source_relation, transaction_date, account_id, class_id, transaction_id, transaction_index |
Window function now orders by transaction_date, transaction_id, transaction_index |
Removes redundant fields (source_relation, account_id, class_id) from ORDER BY clause as they are already in the PARTITION BY clause and do not affect ordering within each partition. These changes eliminate undeterministic behavior in the running balance calculations |
Removes redundant source_relation field from ORDER BY clauses in window functions where this field was already included in the PARTITION BY clause for the following models:
int_quickbooks__bill_payment_double_entryint_quickbooks__credit_card_pymt_double_entryint_quickbooks__payment_double_entryint_quickbooks__transfer_double_entryint_quickbooks__general_ledger_balancesquickbooks__cash_flow_statement
PR #196 includes the following updates:
1 total change β’ 0 possible breaking changes
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
quickbooks__general_ledger |
running_balance and running_converted_balance logic update |
Window function ordered by source_relation, transaction_date, account_id, class_id, transaction_id, transaction_index |
Window function now orders by transaction_date, transaction_id, transaction_index |
Removes redundant fields (source_relation, account_id, class_id) from ORDER BY clause as they are already in the PARTITION BY clause and do not affect ordering within each partition. These changes eliminate undeterministic behavior in the running balance calculations |
PR #195 includes the following updates:
4 total changes β’ 1 possible breaking change
| Data Model(s) | Change type | Old | New | Notes |
|---|---|---|---|---|
stg_quickbooks__bill |
Column rename | due_date_at |
due_date |
Corrects naming since the datatype is date |
quickbooks__expenses_sales_enhanced |
New columns | account_number, parent_account_number |
Adds account number fields for easier account identification and grouping | |
quickbooks__general_ledger |
New columns | period_first_day, period_last_day |
Adds monthly period fields for easier period-based reporting without requiring joins to GL by period model | |
(analysis) quickbooks__income_statement_analysis |
New columns | source_relation |
Adds multi-source support |
- Updates
int_quickbooks__general_ledger_date_spinedate generation logic to prevent errors during compilation. - Renames
analysis/directory toanalyses/for consistency with dbt naming conventions. - Corrects misspelling of
payed_to_account_idtopaid_to_account_idwithinint_quickbooks__bill_double_entrymodel. Note this does not result in a schema change.
PR #194 include the following updates:
- Removes duplicative variables defined within the quickstart.yml.
PR #192 and PR #193 include the following updates:
- Fixed typo in
stg_quickbooks.ymlchangingtest:totests:for proper dbt syntax compliance.
- Updates README with standardized Fivetran formatting.
- Updates DECISIONLOG to explicitly call out join logic that requires a single designated Accounts Payable and a single designated Accounts Receivable account per currency with a possible workaround using variable configuration.
- Updates README to reference the DECISIONLOG for additional details on configuring account type names to avoid potential data fanout issues.
- Removed tax line table variables from
quickstart.ymlfor Quickstart customers to prevent potential configuration issues until tax lines are fully validated for Quickstart use. - In the
quickstart.ymlfile:- Adds
table_variablesfor relevant sources to prevent missing sources from blocking downstream Quickstart models. - Adds
supported_varsfor Quickstart UI customization.
- Adds
PR #187 includes the following updates:
- Fixes
int_quickbooks__purchase_double_entryby bringing in purchase tax line amounts and converted amounts for customers leveraging multicurrency. - Updates
int_quickbooks__invoice_double_entrywith join oncurrency_idfor Accounts Receivable accounts to prevent fanout for customers with multiple currencies.
PR #189 includes the following updates:
- Increases the required dbt version upper limit to v3.0.0
PR #188 is a pre-release that includes the following updates:
- Introduced the
quickbooks__home_currencyvariable to optimize multicurrency handling. When set transactions in the home currency will not apply exchange rate conversions, improving accuracy and performance. This variable is implemented across all 13 intermediate double-entry transaction models to ensure consistent multicurrency behavior throughout the package.
PR #187 is a pre-release that includes the following updates:
- Fixes
int_quickbooks__purchase_double_entryby bringing in purchase tax line amounts and converted amounts for customers leveraging multicurrency. - Updates
int_quickbooks__invoice_double_entrywith join oncurrency_idfor Accounts Receivable accounts to prevent fanout for customers with multiple currencies.
PR #185 includes the following updates, based on the updates made in the v1.0.1-a1 and v1.0.2-a1 pre-releases:
- Updates the
is_overdueanddays_overduelogic in thequickbooks__ap_ar_enhancedmodel to comparedue_datewith the current date instead ofrecent_payment_date, which can be null. This ensures accurate overdue status and day counts for bills and invoices.
- Adds in
quickstart.ymlvariables for tax line source tables so Quickstart customers can leverage tax lines.- If you leverage tax lines, we encourage you to review the accuracy of the end models following this update. If you notice any issues, please open a Fivetran support ticket and let our team know.
- See the v1.0.0 release notes to review the new tax line staging models and updates.
PR #184 includes the following updates:
- Updates the
is_overdueanddays_overduelogic in thequickbooks__ap_ar_enhancedmodel to comparedue_datewith the current date instead ofrecent_payment_date, which can be null. This ensures accurate overdue status and day counts for bills and invoices.
PR #179 is a pre-release that includes the following updates:
- Adds in
quickstart.ymlvariables for tax line source tables so Quickstart customers can continue to leverage tax lines. - This update in essence replicates the prior tax line pre-release, but now based off the latest version of the QuickBooks data models.
- Please open a Fivetran support ticket if you'd like to test out this pre-release and see if the new tax line feature ties out your financial reporting.
PR #178 includes the following updates:
- Removed the dependency on the
fivetran/quickbooks_sourcepackage.- All functionality from the source package has been merged into this transformation package for improved maintainability and clarity.
- If you reference
fivetran/quickbooks_sourcein yourpackages.yml, you must remove this dependency to avoid conflicts. - Any source overrides referencing the
fivetran/quickbooks_sourcepackage will also need to be removed or updated to reference this package. - Update any
quickbooks_source-scoped variables to be scoped to only under this package. See the README for how to configure the build schema of staging models.
- As part of the consolidation, vars are no longer used to reference staging models, and only sources are represented by vars. Staging models are now referenced directly with
ref()in downstream models.
14 new models -- 14 potential breaking changes
NOTE: These models are not available to Quickstart users until we have validated tax lines work as expected. Please open a Fivetran support ticket if you'd like to try out the pre-release that contains tax line support. They are available for dbt Core customers only if you enable the appropriate variables (see the README for more details).
| Data Model | Change Type | Old Name | New Name | Notes |
|---|---|---|---|---|
stg_quickbooks__invoice_tax_line |
New Staging Model | Source: invoice_tax_line table. Disabled by default, leverage using_invoice_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__journal_entry_tax_line |
New Staging Model | Source: journal_entry_tax_line table. Disabled by default, leverage using_journal_entry_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__purchase_tax_line |
New Staging Model | Source: purchase_tax_line table. Disabled by default, leverage using_purchase_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__refund_receipt_tax_line |
New Staging Model | Source: refund_receipt_tax_line table. Disabled by default, leverage using_refund_receipt_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__sales_receipt_tax_line |
New Staging Model | Source: sales_receipt_tax_line table. Disabled by default, leverage using_sales_receipt_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_agency |
New Staging Model | Source: tax_agency table. Disabled by default, leverage using_tax_agency variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_rate |
New Staging Model | Source: tax_rate table. Disabled by default, leverage using_tax_rate variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__invoice_tax_line_tmp |
New Temp Model | Source: invoice_tax_line table. Enabled by default, leverage using_invoice_tax_line variable in dbt_project.yml to disable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__journal_entry_tax_line_tmp |
New Temp Model | Source: journal_entry_tax_line table. Disabled by default, leverage using_journal_entry_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__purchase_tax_line_tmp |
New Temp Model | Source: purchase_tax_line table. Disabled by default, leverage using_purchase_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__refund_receipt_tax_line_tmp |
New Temp Model | Source: refund_receipt_tax_line table. Disabled by default, leverage using_refund_receipt_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__sales_receipt_tax_line_tmp |
New Temp Model | Source: sales_receipt_tax_line table. Disabled by default, leverage using_sales_receipt_tax_line variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_agency_tmp |
New Temp Model | Source: tax_agency table. Disabled by default, leverage using_tax_agency variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_rate_tmp |
New Temp Model | Source: tax_rate table. Disabled by default, leverage using_tax_rate variable in dbt_project.yml to enable. (Once available in a future update, this will be dynamically handled for Quickstart users.) |
- Corrected the
int_quickbooks__invoice_double_entrymodel to accurately map bundled invoice lines to the correctamount,converted_amount,account_id,index, andclass_id.
- Updated seed files to ensure accurate representation of invoice bundles.
- Updated
run_models.shto execute for when the new variables are enabled. - Updated
general_ledger_amounts_matchintegrity test to properly validate general ledger amounts. - Excluded the
running_balanceandcumulative_running_balancevalues from theconsistency_general_ledgervalidation test as these results can change based on how the window function orders transactions on the same date.
PR #171 is a pre-release that introduces the following updates.
14 new models -- 14 potential breaking changes
| Data Model | Change Type | Old Name | New Name | Notes |
|---|---|---|---|---|
stg_quickbooks__invoice_tax_line |
New Staging Model | Source: invoice_tax_line table. Disabled by default, leverage using_invoice_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__journal_entry_tax_line |
New Staging Model | Source: journal_entry_tax_line table. Disabled by default, leverage using_journal_entry_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__purchase_tax_line |
New Staging Model | Source: purchase_tax_line table. Disabled by default, leverage using_purchase_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__refund_receipt_tax_line |
New Staging Model | Source: refund_receipt_tax_line table. Disabled by default, leverage using_refund_receipt_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__sales_receipt_tax_line |
New Staging Model | Source: sales_receipt_tax_line table. Disabled by default, leverage using_sales_receipt_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_agency |
New Staging Model | Source: tax_agency table. Disabled by default, leverage using_tax_agency variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_rate |
New Staging Model | Source: tax_rate table. Disabled by default, leverage using_tax_rate variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__invoice_tax_line_tmp |
New Temp Model | Source: invoice_tax_line table. Enabled by default, leverage using_invoice_tax_line variable in dbt_project.yml to disable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__journal_entry_tax_line_tmp |
New Temp Model | Source: journal_entry_tax_line table. Disabled by default, leverage using_journal_entry_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__purchase_tax_line_tmp |
New Temp Model | Source: purchase_tax_line table. Disabled by default, leverage using_purchase_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__refund_receipt_tax_line_tmp |
New Temp Model | Source: refund_receipt_tax_line table. Disabled by default, leverage using_refund_receipt_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__sales_receipt_tax_line_tmp |
New Temp Model | Source: sales_receipt_tax_line table. Disabled by default, leverage using_sales_receipt_tax_line variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_agency_tmp |
New Temp Model | Source: tax_agency table. Disabled by default, leverage using_tax_agency variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
||
stg_quickbooks__tax_rate_tmp |
New Temp Model | Source: tax_rate table. Disabled by default, leverage using_tax_rate variable in dbt_project.yml to enable. (This will be dynamically handled for Quickstart users.) |
- Corrected the
int_quickbooks__invoice_double_entrymodel to accurately map bundled invoice lines to the correctamount,converted_amount,account_id,index, andclass_id.
- This update incorporates tax lines into the below double entry models.
int_quickbooks__invoice_double_entryint_quickbooks__journal_entry_double_entryint_quickbooks__purchase_double_entryint_quickbooks__refund_receipt_double_entryint_quickbooks__sales_receipt_double_entry
- These lines then filter into our financial end models to provide more accurate financial reporting.
- We created logic to the account for each invoice tax line to the tax agency associated with an account.
- We provide fallbacks to the 'Sales Tax Payable' and 'Global Tax Payable' accounts if needed with variables you can leverage to configure your own custom account.
- Created equivalent double entry line for a tax item that associates with the invoice's existing Accounts Receivable account.
- To prevent uniqueness test failures with these tax line items, we start the tax line
indexin each double entry model at 10000. - Created enable/disable variables to map to each of the new source tables and their downstream dependencies. For dbt core users, see the README for more details about how to configure these variables.
- Updated
quickstart.ymlwith the new variables for each new table to enable/disable based on the whether the source tables are being utilized. - Created new seed files for the above source tables to test and validate new models work as expected.
- Updated seed files to ensure accurate representation of invoice bundles.
- Updated
run_models.shto execute for when the new variables are enabled. - Updated
general_ledger_amounts_matchintegrity test to properly validate general ledger amounts. - Excluded the
running_balanceandcumulative_running_balancevalues from theconsistency_general_ledgervalidation test as these results can change based on how the window function orders transactions on the same date.
PR #176 includes the following updates:
4 total changes β’ 0 possible breaking changes
- This package now provides full multicurrency support for our financial reporting with exchange rates for credit card payments and transfers now introduced.
| Data Model | Change Type | Old Behavior | New Behavior | Notes |
|---|---|---|---|---|
int_quickbooks__credit_card_pymt_double_entry |
New logic | converted_amount was same as amount |
exchange_rate now utilized to calculate converted_amount. |
Adds multicurrency support for credit card payment transactions. |
int_quickbooks__transfer_double_entry |
New logic | converted_amount was same as amount |
exchange_rate now utilized to calculate converted_amount. |
Adds multicurrency support for transfers. |
stg_quickbooks__credit_card_payment_txn |
New columns | exchange_rate |
Adds multicurrency support for credit card payment transactions. | |
stg_quickbooks__transfer |
New columns | currency_id, exchange_rate |
Adds multicurrency support for transfers. |
- Removed references to credit card/transfer multicurrency transactions not being supported in DECISIONLOG and README.
PR #173 includes the following updates:
- Updated package to maintain compatibility with dbt-core versions both before and after v1.10.6, which introduced a breaking change to multi-argument test syntax (e.g.,
unique_combination_of_columns). - Temporarily removed unsupported tests to avoid errors and ensure smoother upgrades across different dbt-core versions. These tests will be reintroduced once a safe migration path is available.
- Removed all
dbt_utils.unique_combination_of_columnstests. - Removed all
accepted_valuestests. - Moved
loaded_at_field: _fivetran_syncedunder theconfig:block insrc_quickbooks.yml.
- Removed all
- Updated conditions in
.github/workflows/auto-release.yml. - Added
.github/workflows/generate-docs.yml.
PR #169 includes the following updates:
- Updated
quickbooks__balance_sheetandquickbooks__income_statementanalysis models to end in*_analysisto stop duplicate model errors in dbt Fusion, as these are existing end models within the package.
- Updated analysis README with new model references.
PR #165 includes the following updates:
Note: This is not relevant to Fivetran Quickstart users.
Migrated freshness from a top-level source property to a source config in alignment with recent updates from dbt Core (QuickBooks Source v0.13.0). This will resolve the following deprecation warning that users running dbt >= 1.9.6 may have received:
[WARNING]: Deprecated functionality
Found `freshness` as a top-level property of `quickbooks` in file
`models/src_quickbooks.yml`. The `freshness` top-level property should be moved
into the `config` of `quickbooks`.
IMPORTANT: Users running dbt Core < 1.9.6 will not be able to utilize freshness tests in this release or any subsequent releases, as older versions of dbt will not recognize freshness as a source config and therefore not run the tests.
If you are using dbt Core < 1.9.6 and want to continue running QuickBooks freshness tests, please elect one of the following options:
- (Recommended) Upgrade to dbt Core >= 1.9.6
- Do not upgrade your installed version of the
quickbookspackage. Pin your dependency on v0.19.0 in yourpackages.ymlfile. - Utilize a dbt override to overwrite the package's
quickbookssource and apply freshness via the previous release top-level property route. This will require you to copy and paste the entirety of the previous releasesrc_quickbooks.ymlfile and add anoverrides: quickbooks_sourceproperty.
- Updates to ensure integration tests use latest version of dbt.
- Applies the bugfix from the v0.19.0-a1 release to revert the
converted_amountupdates within theint_quickbooks__bill_payment_double_entrymodel introduced within the v0.18.0 release. (PR #164)
- Reverted
converted_amountupdates within theint_quickbooks__bill_payment_double_entrymodel introduced within the v0.18.0 release. (PR #164)
- Updated
docs.mdto fix incorrect{% enddocs %}statement. (PR #161)
PR #159 introduces the following updates:
- Updated
int_quickbooks__expenses_unionto filter on account classifications rather than types. This will now correctly include 'Other Expense' and 'Cost of Goods Sold' account types as Expense accounts in thequickbooks__expenses_sales_enhancedmodel.
- Updated seed files to properly populate and validate the
quickbooks__expenses_sales_enhancedmodel works as expected. - Created integrity test to compare source and end model transactions in the
quickbooks__expenses_sales_enhancedmodel.
This release introduces the following updates.
- Modified
int_quickbooks__bill_payment_double_entrymodel to ensure bill payment accuracy by updating theconverted_amountlogic. These changes improve the integrity and granularity of debit/credit entries for bill payments. (PR #155) - We've made this a breaking change as this update could potentially change (but fix) the amount outputs of the end models.
- Utilized the line-level
amountfrom bill payment lines instead oftotal_amountfrom bill payments, then summed the lines to calculate the total. Bill payment lines in a bill payment can have different exchange rates applied depending on which bill it's associated with, so the bill exchange rate can come into play. - Applied
exchange_ratefrom the associated bill where available, falling back to the bill payment exchange rate otherwise. - Inverted the sign of the
amountwhen associated with a journal entry (to correctly reflect the accounting direction). - Updated joins to link bill payments with related bills and bill payment lines via the
bill_linked_txntable to support more accurate allocation of payment amounts.
- Utilized the line-level
- Added a general ledger consistency test to ensure matching records between production and development models. (#155)
- Added Quickstart model counts to README. (#152)
- Corrected references to connectors and connections in the README. (#152)
PR #149 introduces the following updates:
- Updated the logic in
int_quickbooks__retained_earningsto ensure accounting periods with no revenue and expense class lines were accounted for.- This will ensure the net income adjustment is available regardless of existing revenue or expenses.
- Brought in
created_atandupdated_atfields for thecredit_card_pymtandinvoiceintermediate*_double_entrymodels to provide full support for thev0.17.0release update.
PR #146 introduces the following updates:
- Introduced the following fields in the
quickbooks__general_ledgermodel 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.- Updated the
*_double_entrymodels to add these fields for each transaction type.
- This is a breaking change as this adds new fields to the existing schema.
PR #143 introduces the following updates:
- Deleted records have been previously been brought into the
dbt_quickbookspackage. To ensure accuracy in reporting, the following updates were made in the v0.11.0 release ofdbt_quickbooks_source: - We introduced the
_fivetran_deletedfield to filter out deleted records from the following staging models:stg_quickbooks__accountstg_quickbooks__bundlestg_quickbooks__customerstg_quickbooks__departmentstg_quickbooks__itemstg_quickbooks__vendor
- Since filtering out deleted records that were previously being counted impact all output models, this is being treated as a breaking change.
- Added the
_fivetran_deletedfield to the above corresponding seed files in integration tests.
- Updated the
consistency_*_amountstests to include theconverted_amountcomparisons. They were previously commented out due to introducing multicurrency support in a previous release that would have led to test failures, but can now be brought in to properly validate these changes.
PR #142 introduces the following updates:
- Updates the
int_quickbooks__sales_receipt_double_entrymodel to prioritize theinvoice_lines.sales_item_account_idas the second viable option in theaccount_idcoalesce statements. This field was previously prioritized last. However, recent observations have made it apparent that when prioritized last, invoice transactions could be attributed to the wrong accounts.- While not a traditional breaking change, we made this a minor upgrade to account for scenarios where the end model results will likely change due to invoices being attributed to the correct accounts.
PR #138 introduces the following updates:
- Added
nulliflogic to account for "divide by zero" errors inint_quickbooks__deposit_double_entryandint_quickbooks__deposit_transactionsfor whentotal_amountvalues from thedepositsource table are zero.
- Added integrity test
deposit_ledger_amounts_matchwithin integration tests to compare deposit amounts betweenint_quickbooks__deposit_double_entryand deposittransaction_typevalues inquickbooks__general_ledger. - Modified seed files in
integration_teststo reproduce issue and confirm fixes.
New major feature alert! Multicurrency is here!
- We have introduced multicurrency support to the following models by providing these new fields that convert transaction amounts by their exchange rates. (PR #134)
- IMPORTANT: We do not yet have proper
converted_amountvalues for credit card payments and transfers. Currently it is being brought in as the equivalent ofamount, so you might see slight discrepancies if need these values converted as well. Please open an issue with us to help work with us to support this feature. - We have kept the existing cash value fields that provides amounts and balances to ensure full coverage to customers regardless of their currency setup. (PR #134)
- The new multicurrency fields that fulfill the same function as the respective existing fields is below:
| Model | New Multicurrency Fields | Respective Single Currency Fields |
|---|---|---|
| quickbooks__general_ledger | adjusted_converted_amount, running_converted_balance |
adjusted_amount, running_balance |
| quickbooks__general_ledger_by_period | period_net_converted_change, period_beginning_converted_balance, period_ending_converted_balance |
period_net_change, period_beginning_balance, period_ending_balance |
| quickbooks__profit_and_loss | converted_amount |
amount |
| quickbooks__balance_sheet | converted_amount |
amount |
| quickbooks__cash_flow_statement | cash_converted_ending_period, cash_converted_beginning_period, cash_converted_net_period |
cash_ending_period, cash_beginning_period, cash_net_period |
| quickbooks__ap_ar_enhanced | total_converted_amount, estimate_total_converted_amount, total_current_converted_payment |
total_amount, estimate_total_amount, total_current_payment |
| quickbooks__expenses_sales_enhanced | total_converted_amount, converted_amount |
total_amount, amount |
- Introduced
*_converted_*type fields in our intermediate models to convert amounts where exchange rates exist for those transactions. If there is no exchange rate, these*_converted_*fields will default back to the already existing fields created for single currency, and all downstream calculations should match the single currency amount, balance and cash values. (PR #134) - For double-entry models that applied a cross-join to either AP/AR accounts, we are now mapping those accounts based on the
currency_idvalue in theaccountssource table for those transactions. (PR #134) - In the
analysisfolder, added theconverted_balanceto thequickbooks__balance_sheetandending_converted_balanceto thequickbooks__income_statementmodels. (PR #134)
- Adjusted logic for discount sales receipt lines in
int_quickbooks__sales_receipt_double_entrymodel to bring in these values properly as negative adjusted amounts in thequickbooks__general_ledger. (PR #130) - Applied filter in
int_quickbooks__invoice_double_entryto filter out 'Accounts Receivable' accounts that are inactive. (PR #134)
- Added consistency and integrity tests within integration tests for all end models. (PR #130) & (PR 134)
- Appended
using_credit_card_payment_txncheck inget_enabled_unioned_modelsmacro tofalseto match consistency of how the variable is defined throughout our Quickbooks models by default.
- Updated README to reflect the new multicurrency support. (PR #134)
- Added yml documentation with the new multicurrency fields and descriptions. (PR #134)
PR #125 includes the following updates:
- The
period_first_dayandperiod_last_dayfields were mistakenly left out in the quickbooks__profit_and_loss model although they were intended to be introduced as new fields in the v0.13.0 release. We have added these fields into the model.
PR #124 includes the following updates:
- Updates the int_quickbooks__invoice_join and downstream quickbooks__ap_ar_enhanced models to include and require the
using_paymentsconfig. Previously, these models would fail if thepaymentor thepayment_linesource tables did not exist. - Corrects the misspelled
customer_vendor_webistefield tocustomer_vendor_websiteinquickbooks__ap_ar_enhanced.
- Updates the logic for the
amountfield in int_quickbooks__invoice_double_entry to useinvoice.total_amountonly on the condition when a bundle is associated with the invoice andinvoice.total_amountis 0, otherwiseinvoice_lines.amountis used.- This avoids double counting when aggregating invoice_line items and accounts for the edge cases where a bundle_id is involved.
- Updates the quickbooks__profit_and_loss and quickbooks__balance_sheet models to include both
period_first_dayandperiod_last_dayin addition tocalendar_date. This allows users to have greater flexibility in choosing which date to aggregate records upon.- Please note
calendar_dateis slated to be deprecated, and the fieldsperiod_first_dayandperiod_last_dayare both offered as replacements, depending on how your company performs their financial reporting.
- Please note
PR #123 includes the following updates:
- Added
source_relationto joins within the following models as it was previously missed:int_quickbooks__invoice_joinint_quickbooks__bill_joinint_quickbooks__refund_receipt_double_entryint_quickbooks__sales_receipt_double_entryquickbooks__balance_sheetanalysis model.
PR #119 includes the following updates:
- Included a default start and end date in the
int_quickbooks__general_ledger_date_spinelogic when generating the date spine. These default start and end dates will ensure the model still succeeds when no transactions are yet available.- The default start date will be one month in the past
- The default end date will be the current date
- Updated the maintainer PR template to resemble the most up to date format.
- Removed the check docs GitHub Action as it is no longer necessary.
PR #114 includes the following updates:
- Updated model
int_quickbooks__invoice_double_entryto account for thesales_item_account_idfield from theinvoice_linessource when determining theaccount_idassociated with an invoice.
PR #109 includes the following updates:
- Adjusted the joins within the below intermediate double entry models to be
left joinas opposed to aninner join. This update was necessary as there was the possibility of the respective account cte joins to return no records. If this was the case, the logic could erroneously remove transactions from the record.
PR #103 includes the following updates:
- Update seeds and configs in the integration tests folder to match what was updated upstream in the (source package PR #51) to correct timestamp fields that should be date fields (
due_date,transaction_date). Previously, some fields were getting interpreted as timestamps while some were interpreted as dates, leading to errors on downstream joins. In the upstream staging models,due_dateandtransaction_dateare now explicitly cast asdatetypes.
This will be a breaking change to those whose source tables still use the old timestamp formats, so please update your package version accordingly.
This PR includes the following updates:
- Updated intermediate double entry models that have
account_typeandaccount_sub_typefilters with configurable variables, since the type names used in the filter can be adjusted internally by QuickBooks customers. (PR #98) - Includes
items.asset_account_idas the second field of the coalesce for thepayed_to_account_idfield within theint_quickbooks__bill_payment_double_entrymodel to ensure all account_id types are taken into consideration when mapping the transaction to the proper account. (PR #100)
- The intermediate models where these variables were introduced in the models below:
| Updated model | New variables to filter on |
|---|---|
| int_quickbooks__bill_payment_double_entry | quickbooks__accounts_payable_reference |
| int_quickbooks__credit_memo_double_entry | quickbooks__accounts_receivable_reference |
| int_quickbooks__deposit_double_entry | quickbooks__undeposited_funds_reference |
| int_quickbooks__invoice_double_entry | quickbooks__sales_of_product_income_reference, quickbooks__accounts_receivable_reference |
| int_quickbooks__payment_double_entry | quickbooks__accounts_receivable_reference |
- Updated README with additional steps for configuration. This is an optional step since most customers will rely on the default account type/subtype values available.
PR #95 includes the following updates:
- Included
source_relationin all joins and window functions for models outputtingsource_relation. This is to prevent duplicate records in end models when using the unioning functionality. These updates were in the intermediate models, which flowed to downstream end models:quickbooks__general_ledgerquickbooks__expenses_sales_enhanced
- In end model
quickbooks__general_ledger, addedsource_relationas part of the generated surrogate keyunique_idto prevent duplicateunique_ids when using the unioning functionality.
- Added description for column
source_relationto the documentation.
- Updated test from a combination of columns to uniqueness of
unique_idinquickbooks__general_ledger. - Updated partitioning in certain models to include
source_relation. - Updated analysis
quickbooks__balance_sheetwith updated join strategy.
- Databricks compatibility! (#92)
PR #93 includes the following updates:
- Adjusted the purchase amount totals within the
int_quickbooks__purchase_transactionsmodel to factor in credits when calculating purchase amounts.
- Added logic to the
int_quickbooks__invoice_double_entrymodel to account for invoice discounts as they should be treated as contra revenue accounts that behavior differently from normal sale item detail invoice line items. (#85) - Updated the
cash_beginning_periodandcash_net_periodvalues to coalesce to 0 in thequickbooks__cash_flow_statementin order to ensure every row has a value, especially the first row in the sequence since it will always be null. (#88)
- Added
department_idto thequickbooks__general_ledgerand the upstream tables required for that change. (#63)- Please note that this field was not added to the downstream
quickbooks__general_ledger_by_period,quickbooks__balance_sheet,quickbooks__profit_and_loss, orquickbooks__cash_flow_statementmodels as this would require the grain of these models to be adjusted for thedepartment_id. This would likely cause more confusion in the initial output. As such, the field was omitted in the aggregate models to ensure consistency of these models. If you wish this to be included, please open a Feature Request to let us know!
- Please note that this field was not added to the downstream
- Included documentation within the DECISIONLOG centered around the behavior of how invoice discounts are handled within the
int_quickbooks__invoice_double_entrymodel. (#85)
- Leveraged the new
detail_typefield to ensure better accuracy when identifying invoice lines that should be accounted for in the general ledger calculations. (#85) - Incorporated the new
fivetran_utils.drop_schemas_automationmacro into the end of each Buildkite integration test job. (#87) - Updated the pull request templates. (#87)
- See the source package CHANGELOG for updates made to the staging layer in
dbt_quickbooks_source v0.8.0.
- Adding partitions by
class_idin appropriate models to ensure correct account amount aggregations inquickbooks__general_ledger,quickbooks__general_ledger_by_period,quickbooks__balance_sheet, andquickbooks__profit_and_lossmodels. (#77) - Modifying join in
int_quickbooks__general_ledger_balancesto account for nullclass_idvalues and bring in the correct non-zero balances. (#77)
- Replacing
account_namewithaccount_idas input for thegenerate_surrogate_keyfunction to fixunique_iduniqueness issues in thequickbooks__general_ledgermodel. A full refresh is recommended for accurate and consistent surrogate keys. (#73)
- Added
transaction_sourcetogenerate_surrogate_keyfunction to fixunique_iduniqueness issues in thequickbooks__general_ledgermodel. A full refresh is recommended for accurate and consistent surrogate keys, for more information please refer to dbt-utils release notes regardinggenerate_surrogate_key. (#62)
- Created the
quickbooks__cash_flow_statementmodel so customers can more easily produce their own cash flow statements. Default categorizations are created inint_quickbooks__cash_flow_classifications, where each account line is assigned acash_flow_type, with main types beingCash or Cash Equivalents,Operating,Investing, andFinancing. Theordinalvalue is also created based on thecash_flow_typefor ordering purposes. All values created are based on cash flow best practices. (#69) - For the
quickbooks__cash_flow_statement, customers can create and configure their owncash_flow_typeandordinalfor ordering purposes. See the README for details and use the seedcash_flow_statement_type_ordinal_examplefile for guidance). (#69) - Added
account_ordinalvalue toquickbooks__general_ledger_by_period,quickbooks__balance_sheetandquickbooks__profit_and_lossto allow customers to order their financial reports based on the account field values. The ordinals can be further configured by the customer. See the README for details and use the seedfinancial_statement_ordinal_examplefile for guidance). (#65) (#66) - Added
class_idtoquickbooks__general_ledger,quickbooks_general_ledger_by_period, andquickbooks__balance_sheet; add in class values for all intermediate models necessary to pass into final models. (#58). - Added
source_relationfield to all Quickbooks models to allow customers, if they have multiple Quickbooks connectors, to union them inside the package. (#62). - Added tests to all final models, particularly to test uniqueness across a combination of columns, including
source_relation. (#62) - Modified
int_quickbooks__retained_earningsintermediate model to accurately reflectaccount_namefield, from "Net Income / Retained Earnings Adjustment" to "Net Income Adjustment". (#66) - Updated README to follow latest package standards. (#71)
- Added
quickbooks_[source_table_name]_identifiervariables so it's easier to refer to source tables with different names. (#71)
PR #51 includes the following breaking changes:
- Dispatch update for dbt-utils to dbt-core cross-db macros migration. Specifically
{{ dbt_utils.<macro> }}have been updated to{{ dbt.<macro> }}for the below macros:any_valuebool_orcast_bool_to_textconcatdate_truncdateadddatediffescape_single_quotesexcepthashintersectlast_daylengthlistaggpositionreplacerightsafe_castsplit_partstring_literaltype_biginttype_floattype_inttype_numerictype_stringtype_timestamparray_appendarray_concatarray_construct
- For
current_timestampandcurrent_timestamp_in_utcmacros, the dispatch AND the macro names have been updated to the below, respectively:dbt.current_timestamp_backcompatdbt.current_timestamp_in_utc_backcompat
- Dependencies on
fivetran/fivetran_utilshave been upgraded, previously[">=0.3.0", "<0.4.0"]now[">=0.4.0", "<0.5.0"].
- Addition of the
credit_card_payment_txn(enabled/disabled using theusing_credit_card_payment_txnvariable) source as well as the accompanying staging and intermediate models. This source includes all credit card payment transactions and will be used in downstream General Ledger generation to ensure accurate reporting of all transaction types. (#61)Note: the
credit_card_payment_txnsource and models are disabled by default. In order to enable them, you will want to set theusing_credit_card_payment_txnvariable totruein your dbt_project.yml.
- @mikerenderco (#50, #47)
- @mel-restori (#54, #47)
- The
int_quickbooks__bill_payment_double_entry,int_quickbooks__credit_memo_double_entry,int_quickbooks__deposit_double_entry, andint_quickbooks__payment_double_entrymodels perform a cross join on thestg_quickbooks__accountsmodel for the respective debit/credit account. However, if this cross join includes more than one record, it will result in duplicates. An additional filter to remove sub accounts has been added to ensure the output of the models do not have duplicates. (#49)
- A GitHub workflow has been added to ensure the dbt docs are regenerated before each merge to the
mainrelease branch. (#49)
- Within the
v0.5.1release, thetransaction_idfield was erroneously removed from thequickbooks__general_ledgermodel. This field has since been added back. (#46)
- Updated the
dbt-utils.surrogate_key()macro to take the argument as a single list rather than a series of strings. This is to be in line with the proper use of the macro and ensure it is not impacted when the series of string argument is deprecated. (#46)
- Created indices for
double_entry_transactionsmodels. Used row_number functions forpayment,bill_paymentandtransfermodels. (#41) - Removed transaction index on final
quickbooks__general_ledgermodel, replaced by the newer indices in the sub-ledgers. (#41) - Adjusted the
bundle_income_accountscte within theint_quickbooks__invoice_double_entrymodels to coalesce the parent and sub account id. This correctly removes any duplicate records caused from this cte in a downstream join. (#42)
- It was discovered that IDs from the source tables can sometimes be strings. The previous build of the package interpreted all IDs as integers. To ensure the package operates as intended, the package has been updated to cast all IDs to the string datatype. If you were leveraging the end models in downstream analysis, this change could break your join conditions. Be sure to be aware of any join conditions you may have downstream before upgrading your QuickBooks package. (#36)[#36]
π dbt v1.0.0 Compatibility π
- Adjusts the
require-dbt-versionto now be within the range [">=1.0.0", "<2.0.0"]. Additionally, the package has been updated for dbt v1.0.0 compatibility. If you are using a dbt version <1.0.0, you will need to upgrade in order to leverage the latest version of the package.- For help upgrading your package, I recommend reviewing this GitHub repo's Release Notes on what changes have been implemented since your last upgrade.
- For help upgrading your dbt project to dbt v1.0.0, I recommend reviewing dbt-labs upgrading to 1.0.0 docs for more details on what changes must be made.
- Upgrades the package dependency to refer to the latest
dbt_quickbooks_source. Additionally, the latestdbt_quickbooks_sourcepackage has a dependency on the latestdbt_fivetran_utils. Further, the latestdbt_fivetran_utilspackage also has a dependency ondbt_utils[">=0.8.0", "<0.9.0"].- Please note, if you are installing a version of
dbt_utilsin yourpackages.ymlthat is not in the range above then you will encounter a package dependency error.
- Please note, if you are installing a version of
Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you!