Skip to content

Latest commit

Β 

History

History
715 lines (548 loc) Β· 70.3 KB

File metadata and controls

715 lines (548 loc) Β· 70.3 KB

dbt_quickbooks v1.4.2

PR #199 includes the following updates:

Bug Fixes

  • With variable configuration now available in Quickstart, the quickbooks__home_currency variable 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 on converted_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_currency variable.
  • Applies fixes in int_quickbooks__sales_receipt_double_entry model to correctly reference quickbooks__global_tax_account_reference and quickbooks__sales_tax_account_reference variables PR #197.
  • Introduces the partition_by_source_relation macro to conditionally include source_relation in window function PARTITION BY clauses only when multiple sources are configured via the quickbooks_union_schemas and quickbooks_union_databases variables. This resolves partition by constant expression errors on Redshift. See the README on how to leverage these variables PR #198.

Under the Hood

  • Changes default quickbooks__home_currency value to empty string for easier understanding within Quickstart UI PR #197.

dbt_quickbooks v1.4.2-a1

PR #197 is a pre-release that includes the following updates:

Bug Fixes

  • With variable configuration now available on Quickstart, we can now introduce the quickbooks__home_currency variable 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 on converted_amount, improving accuracy. When left empty, all transactions will see exchange rate conversions applied.
    • Updates the README with instructions for configuring the quickbooks__home_currency variable.
  • Applies fixes in int_quickbooks__sales_receipt_double_entry model to correctly reference quickbooks__global_tax_account_reference and quickbooks__sales_tax_account_reference variables.

Under the Hood

  • Changes default quickbooks__home_currency value to empty string for easier understanding within Quickstart UI.

dbt_quickbooks v1.4.1

PR #196 includes the following updates:

Schema/Data Change

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

Under the Hood

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_entry
  • int_quickbooks__credit_card_pymt_double_entry
  • int_quickbooks__payment_double_entry
  • int_quickbooks__transfer_double_entry
  • int_quickbooks__general_ledger_balances
  • quickbooks__cash_flow_statement

dbt_quickbooks v1.4.1-a1

PR #196 includes the following updates:

Schema/Data Change

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

dbt_quickbooks v1.4.0

PR #195 includes the following updates:

Schema/Data Change

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

Under the Hood

  • Updates int_quickbooks__general_ledger_date_spine date generation logic to prevent errors during compilation.
  • Renames analysis/ directory to analyses/ for consistency with dbt naming conventions.
  • Corrects misspelling of payed_to_account_id to paid_to_account_id within int_quickbooks__bill_double_entry model. Note this does not result in a schema change.

dbt_quickbooks v1.3.1

PR #194 include the following updates:

Under the Hood (Quickstart Update)

  • Removes duplicative variables defined within the quickstart.yml.

dbt_quickbooks v1.3.0

PR #192 and PR #193 include the following updates:

Bug Fixes

  • Fixed typo in stg_quickbooks.yml changing test: to tests: for proper dbt syntax compliance.

Documentation

  • 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.

Under the Hood

  • Removed tax line table variables from quickstart.yml for Quickstart customers to prevent potential configuration issues until tax lines are fully validated for Quickstart use.
  • In the quickstart.yml file:
    • Adds table_variables for relevant sources to prevent missing sources from blocking downstream Quickstart models.
    • Adds supported_vars for Quickstart UI customization.

dbt_quickbooks v1.2.1

PR #187 includes the following updates:

Bug Fixes

  • Fixes int_quickbooks__purchase_double_entry by bringing in purchase tax line amounts and converted amounts for customers leveraging multicurrency.
  • Updates int_quickbooks__invoice_double_entry with join on currency_id for Accounts Receivable accounts to prevent fanout for customers with multiple currencies.

dbt_quickbooks v1.2.0

PR #189 includes the following updates:

Features

  • Increases the required dbt version upper limit to v3.0.0

dbt_quickbooks v1.1.1-a2

PR #188 is a pre-release that includes the following updates:

Bug Fixes

  • Introduced the quickbooks__home_currency variable 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.

dbt_quickbooks v1.1.1-a1

PR #187 is a pre-release that includes the following updates:

Bug Fixes

  • Fixes int_quickbooks__purchase_double_entry by bringing in purchase tax line amounts and converted amounts for customers leveraging multicurrency.
  • Updates int_quickbooks__invoice_double_entry with join on currency_id for Accounts Receivable accounts to prevent fanout for customers with multiple currencies.

dbt_quickbooks v1.1.0

PR #185 includes the following updates, based on the updates made in the v1.0.1-a1 and v1.0.2-a1 pre-releases:

Bug Fix

  • Updates the is_overdue and days_overdue logic in the quickbooks__ap_ar_enhanced model to compare due_date with the current date instead of recent_payment_date, which can be null. This ensures accurate overdue status and day counts for bills and invoices.

Quickstart Updates

  • Adds in quickstart.yml variables 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.

dbt_quickbooks v1.0.2-a1

PR #184 includes the following updates:

Bug Fix

  • Updates the is_overdue and days_overdue logic in the quickbooks__ap_ar_enhanced model to compare due_date with the current date instead of recent_payment_date, which can be null. This ensures accurate overdue status and day counts for bills and invoices.

dbt_quickbooks v1.0.1-a1

PR #179 is a pre-release that includes the following updates:

Quickstart Updates

  • Adds in quickstart.yml variables 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.

dbt_quickbooks v1.0.0

PR #178 includes the following updates:

Breaking Changes

Source Package Consolidation

  • Removed the dependency on the fivetran/quickbooks_source package.
    • All functionality from the source package has been merged into this transformation package for improved maintainability and clarity.
    • If you reference fivetran/quickbooks_source in your packages.yml, you must remove this dependency to avoid conflicts.
    • Any source overrides referencing the fivetran/quickbooks_source package 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.

Schema Updates

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.)

Bug Fixes

  • Corrected the int_quickbooks__invoice_double_entry model to accurately map bundled invoice lines to the correct amount, converted_amount, account_id, index, and class_id.

Under the Hood

  • Updated seed files to ensure accurate representation of invoice bundles.
  • Updated run_models.sh to execute for when the new variables are enabled.
  • Updated general_ledger_amounts_match integrity test to properly validate general ledger amounts.
  • Excluded the running_balance and cumulative_running_balance values from the consistency_general_ledger validation test as these results can change based on how the window function orders transactions on the same date.

dbt_quickbooks v0.22.0-a1

PR #171 is a pre-release that introduces the following updates.

Schema 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.)

Bug Fixes

  • Corrected the int_quickbooks__invoice_double_entry model to accurately map bundled invoice lines to the correct amount, converted_amount, account_id, index, and class_id.

Feature Updates

  • This update incorporates tax lines into the below double entry models.
    • int_quickbooks__invoice_double_entry
    • int_quickbooks__journal_entry_double_entry
    • int_quickbooks__purchase_double_entry
    • int_quickbooks__refund_receipt_double_entry
    • int_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 index in 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.

Under the Hood

  • Updated quickstart.yml with 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.sh to execute for when the new variables are enabled.
  • Updated general_ledger_amounts_match integrity test to properly validate general ledger amounts.
  • Excluded the running_balance and cumulative_running_balance values from the consistency_general_ledger validation test as these results can change based on how the window function orders transactions on the same date.

dbt_quickbooks v0.21.1

PR #176 includes the following updates:

Schema & Data Updates

4 total changes β€’ 0 possible breaking changes

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.

Documentation Update

  • Removed references to credit card/transfer multicurrency transactions not being supported in DECISIONLOG and README.

dbt_quickbooks v0.21.0

PR #173 includes the following updates:

dbt Fusion Compatibility 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_columns tests.
    • Removed all accepted_values tests.
    • Moved loaded_at_field: _fivetran_synced under the config: block in src_quickbooks.yml.

Under the Hood

  • Updated conditions in .github/workflows/auto-release.yml.
  • Added .github/workflows/generate-docs.yml.

dbt_quickbooks v0.20.1

PR #169 includes the following updates:

Bug Fix

  • Updated quickbooks__balance_sheet and quickbooks__income_statement analysis models to end in *_analysis to stop duplicate model errors in dbt Fusion, as these are existing end models within the package.

Documentation

  • Updated analysis README with new model references.

Contributors

dbt_quickbooks v0.20.0

PR #165 includes the following updates:

Breaking Change for dbt Core < 1.9.6

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:

  1. (Recommended) Upgrade to dbt Core >= 1.9.6
  2. Do not upgrade your installed version of the quickbooks package. Pin your dependency on v0.19.0 in your packages.yml file.
  3. Utilize a dbt override to overwrite the package's quickbooks source and apply freshness via the previous release top-level property route. This will require you to copy and paste the entirety of the previous release src_quickbooks.yml file and add an overrides: quickbooks_source property.

Under the Hood

  • Updates to ensure integration tests use latest version of dbt.

dbt_quickbooks v0.19.0

Bug Fixes

  • Applies the bugfix from the v0.19.0-a1 release to revert the converted_amount updates within the int_quickbooks__bill_payment_double_entry model introduced within the v0.18.0 release. (PR #164)

dbt_quickbooks v0.19.0-a1

Bug Fixes

  • Reverted converted_amount updates within the int_quickbooks__bill_payment_double_entry model introduced within the v0.18.0 release. (PR #164)

dbt_quickbooks v0.18.2

Documentation Fixes

  • Updated docs.md to fix incorrect {% enddocs %} statement. (PR #161)

Contributors

dbt_quickbooks v0.18.1

PR #159 introduces the following updates:

Bug Fixes

  • Updated int_quickbooks__expenses_union to 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 the quickbooks__expenses_sales_enhanced model.

Under the Hood

  • Updated seed files to properly populate and validate the quickbooks__expenses_sales_enhanced model works as expected.
  • Created integrity test to compare source and end model transactions in the quickbooks__expenses_sales_enhanced model.

dbt_quickbooks v0.18.0

This release introduces the following updates.

Breaking Changes

  • Modified int_quickbooks__bill_payment_double_entry model to ensure bill payment accuracy by updating the converted_amount logic. 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 amount from bill payment lines instead of total_amount from 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_rate from the associated bill where available, falling back to the bill payment exchange rate otherwise.
    • Inverted the sign of the amount when 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_txn table to support more accurate allocation of payment amounts.

Under the Hood

  • Added a general ledger consistency test to ensure matching records between production and development models. (#155)

Documentation

  • Added Quickstart model counts to README. (#152)
  • Corrected references to connectors and connections in the README. (#152)

dbt_quickbooks v0.17.1

PR #149 introduces the following updates:

Bug Fix

  • Updated the logic in int_quickbooks__retained_earnings to 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_at and updated_at fields for the credit_card_pymt and invoice intermediate *_double_entry models to provide full support for the v0.17.0 release update.

dbt_quickbooks v0.17.0

PR #146 introduces the following updates:

Breaking Changes

  • Introduced the following fields in the quickbooks__general_ledger model 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_entry models to add these fields for each transaction type.
  • This is a breaking change as this adds new fields to the existing schema.

dbt_quickbooks v0.16.0

PR #143 introduces the following updates:

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
  • Since filtering out deleted records that were previously being counted impact all output models, this is being treated as a breaking change.

Documentation update

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

Under The Hood

  • Updated the consistency_*_amounts tests to include the converted_amount comparisons. 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.

dbt_quickbooks v0.15.0

PR #142 introduces the following updates:

Bug Fixes

  • Updates the int_quickbooks__sales_receipt_double_entry model to prioritize the invoice_lines.sales_item_account_id as the second viable option in the account_id coalesce 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.

dbt_quickbooks v0.14.1

PR #138 introduces the following updates:

Bug Fixes

  • Added nullif logic to account for "divide by zero" errors in int_quickbooks__deposit_double_entry and int_quickbooks__deposit_transactions for when total_amount values from the deposit source table are zero.

Under the Hood

  • Added integrity test deposit_ledger_amounts_match within integration tests to compare deposit amounts between int_quickbooks__deposit_double_entry and deposit transaction_type values in quickbooks__general_ledger.
  • Modified seed files in integration_tests to reproduce issue and confirm fixes.

dbt_quickbooks v0.14.0

New major feature alert! Multicurrency is here!

🚨 Breaking Changes 🚨

Feature Updates: Multicurrency Support

  • 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_amount values for credit card payments and transfers. Currently it is being brought in as the equivalent of amount, 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_id value in the accounts source table for those transactions. (PR #134)
  • In the analysis folder, added the converted_balance to the quickbooks__balance_sheet and ending_converted_balance to the quickbooks__income_statement models. (PR #134)

Bug Fixes

  • Adjusted logic for discount sales receipt lines in int_quickbooks__sales_receipt_double_entry model to bring in these values properly as negative adjusted amounts in the quickbooks__general_ledger. (PR #130)
  • Applied filter in int_quickbooks__invoice_double_entry to filter out 'Accounts Receivable' accounts that are inactive. (PR #134)

Under the Hood

  • Added consistency and integrity tests within integration tests for all end models. (PR #130) & (PR 134)
  • Appended using_credit_card_payment_txn check in get_enabled_unioned_models macro to false to match consistency of how the variable is defined throughout our Quickbooks models by default.

Documentation Update

Contributors

dbt_quickbooks v0.13.1

PR #125 includes the following updates:

Bug Fix

dbt_quickbooks v0.13.0

PR #124 includes the following updates:

🚨 Breaking Changes 🚨:

  • Updates the int_quickbooks__invoice_join and downstream quickbooks__ap_ar_enhanced models to include and require the using_payments config. Previously, these models would fail if the payment or the payment_line source tables did not exist.
  • Corrects the misspelled customer_vendor_webiste field to customer_vendor_website in quickbooks__ap_ar_enhanced.

Bug Fixes

  • Updates the logic for the amount field in int_quickbooks__invoice_double_entry to use invoice.total_amount only on the condition when a bundle is associated with the invoice and invoice.total_amount is 0, otherwise invoice_lines.amount is used.
    • This avoids double counting when aggregating invoice_line items and accounts for the edge cases where a bundle_id is involved.

Feature Updates

  • Updates the quickbooks__profit_and_loss and quickbooks__balance_sheet models to include both period_first_day and period_last_day in addition to calendar_date. This allows users to have greater flexibility in choosing which date to aggregate records upon.
    • Please note calendar_date 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.

dbt_quickbooks v0.12.4

PR #123 includes the following updates:

Bug Fixes

  • Added source_relation to joins within the following models as it was previously missed:
    • int_quickbooks__invoice_join
    • int_quickbooks__bill_join
    • int_quickbooks__refund_receipt_double_entry
    • int_quickbooks__sales_receipt_double_entry
    • quickbooks__balance_sheet analysis model.

Contributors

dbt_quickbooks v0.12.3

PR #119 includes the following updates:

Bug Fixes

  • Included a default start and end date in the int_quickbooks__general_ledger_date_spine logic 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

Under the Hood

  • 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.

dbt_quickbooks v0.12.2

PR #114 includes the following updates:

Bug Fixes

  • Updated model int_quickbooks__invoice_double_entry to account for the sales_item_account_id field from the invoice_lines source when determining the account_id associated with an invoice.

dbt_quickbooks v0.12.1

PR #109 includes the following updates:

Bug Fixes

dbt_quickbooks v0.12.0

PR #103 includes the following updates:

🚘 Under the Hood

  • 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_date and transaction_date are now explicitly cast as date types.

This will be a breaking change to those whose source tables still use the old timestamp formats, so please update your package version accordingly.

dbt_quickbooks v0.11.1

This PR includes the following updates:

πŸ› Bug Fixes 🩹

  • Updated intermediate double entry models that have account_type and account_sub_type filters with configurable variables, since the type names used in the filter can be adjusted internally by QuickBooks customers. (PR #98)
  • Includes items.asset_account_id as the second field of the coalesce for the payed_to_account_id field within the int_quickbooks__bill_payment_double_entry model to ensure all account_id types are taken into consideration when mapping the transaction to the proper account. (PR #100)

πŸŽ‰ Feature Updates πŸŽ‰

  • 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

πŸ—’οΈ Documentation

Contributors

dbt_quickbooks v0.11.0

🚨 Breaking Changes 🚨

PR #95 includes the following updates:

πŸͺ² Bug Fixes

  • Included source_relation in all joins and window functions for models outputting source_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_ledger
    • quickbooks__expenses_sales_enhanced
  • In end model quickbooks__general_ledger, added source_relation as part of the generated surrogate key unique_id to prevent duplicate unique_ids when using the unioning functionality.

πŸŽ‰ Features

  • Added description for column source_relation to the documentation.

🚘 Under the Hood

  • Updated test from a combination of columns to uniqueness of unique_id in quickbooks__general_ledger.
  • Updated partitioning in certain models to include source_relation.
  • Updated analysis quickbooks__balance_sheet with updated join strategy.

dbt_quickbooks v0.10.0

πŸŽ‰ Feature Update πŸŽ‰

  • Databricks compatibility! (#92)

dbt_quickbooks v0.9.1

PR #93 includes the following updates:

Bug Fixes

  • Adjusted the purchase amount totals within the int_quickbooks__purchase_transactions model to factor in credits when calculating purchase amounts.

dbt_quickbooks v0.9.0

Bug Fixes

  • Added logic to the int_quickbooks__invoice_double_entry model 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_period and cash_net_period values to coalesce to 0 in the quickbooks__cash_flow_statement in order to ensure every row has a value, especially the first row in the sequence since it will always be null. (#88)

Additional Features

  • Added department_id to the quickbooks__general_ledger and 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, or quickbooks__cash_flow_statement models as this would require the grain of these models to be adjusted for the department_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!

Documentation

  • Included documentation within the DECISIONLOG centered around the behavior of how invoice discounts are handled within the int_quickbooks__invoice_double_entry model. (#85)

Under the Hood

  • Leveraged the new detail_type field 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_automation macro into the end of each Buildkite integration test job. (#87)
  • Updated the pull request templates. (#87)

Complimentary Release Notes

  • See the source package CHANGELOG for updates made to the staging layer in dbt_quickbooks_source v0.8.0.

Contributors

dbt_quickbooks v0.8.1

πŸ› Bug Fixes πŸ”¨

  • Adding partitions by class_id in appropriate models to ensure correct account amount aggregations in quickbooks__general_ledger, quickbooks__general_ledger_by_period, quickbooks__balance_sheet, and quickbooks__profit_and_loss models. (#77)
  • Modifying join in int_quickbooks__general_ledger_balances to account for null class_id values and bring in the correct non-zero balances. (#77)

dbt_quickbooks v0.8.0

🚨 Breaking Changes 🚨

  • Replacing account_name with account_id as input for the generate_surrogate_key function to fix unique_id uniqueness issues in the quickbooks__general_ledger model. A full refresh is recommended for accurate and consistent surrogate keys. (#73)

dbt_quickbooks v0.7.0

🚨 Breaking Changes 🚨

  • Added transaction_source to generate_surrogate_key function to fix unique_id uniqueness issues in the quickbooks__general_ledger model. A full refresh is recommended for accurate and consistent surrogate keys, for more information please refer to dbt-utils release notes regarding generate_surrogate_key. (#62)

Additional Features

  • Created the quickbooks__cash_flow_statement model so customers can more easily produce their own cash flow statements. Default categorizations are created in int_quickbooks__cash_flow_classifications, where each account line is assigned a cash_flow_type, with main types being Cash or Cash Equivalents, Operating, Investing, and Financing. The ordinal value is also created based on the cash_flow_type for 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 own cash_flow_type and ordinal for ordering purposes. See the README for details and use the seed cash_flow_statement_type_ordinal_example file for guidance). (#69)
  • Added account_ordinal value to quickbooks__general_ledger_by_period, quickbooks__balance_sheet and quickbooks__profit_and_loss to 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 seed financial_statement_ordinal_example file for guidance). (#65) (#66)
  • Added class_id to quickbooks__general_ledger, quickbooks_general_ledger_by_period, and quickbooks__balance_sheet; add in class values for all intermediate models necessary to pass into final models. (#58).
  • Added source_relation field 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_earnings intermediate model to accurately reflect account_name field, from "Net Income / Retained Earnings Adjustment" to "Net Income Adjustment". (#66)
  • Updated README to follow latest package standards. (#71)
  • Added quickbooks_[source_table_name]_identifier variables so it's easier to refer to source tables with different names. (#71)

dbt_quickbooks v0.6.0

🚨 Breaking Changes 🚨

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_value
    • bool_or
    • cast_bool_to_text
    • concat
    • date_trunc
    • dateadd
    • datediff
    • escape_single_quotes
    • except
    • hash
    • intersect
    • last_day
    • length
    • listagg
    • position
    • replace
    • right
    • safe_cast
    • split_part
    • string_literal
    • type_bigint
    • type_float
    • type_int
    • type_numeric
    • type_string
    • type_timestamp
    • array_append
    • array_concat
    • array_construct
  • For current_timestamp and current_timestamp_in_utc macros, the dispatch AND the macro names have been updated to the below, respectively:
    • dbt.current_timestamp_backcompat
    • dbt.current_timestamp_in_utc_backcompat
  • Dependencies on fivetran/fivetran_utils have been upgraded, previously [">=0.3.0", "<0.4.0"] now [">=0.4.0", "<0.5.0"].

dbt_quickbooks v0.5.4

Features

  • Addition of the credit_card_payment_txn (enabled/disabled using the using_credit_card_payment_txn variable) 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_txn source and models are disabled by default. In order to enable them, you will want to set the using_credit_card_payment_txn variable to true in your dbt_project.yml.

Contributors

dbt_quickbooks v0.5.3

Bug Fixes

  • The int_quickbooks__bill_payment_double_entry, int_quickbooks__credit_memo_double_entry, int_quickbooks__deposit_double_entry, and int_quickbooks__payment_double_entry models perform a cross join on the stg_quickbooks__accounts model 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)

Under the Hood

  • A GitHub workflow has been added to ensure the dbt docs are regenerated before each merge to the main release branch. (#49)

dbt_quickbooks v0.5.2

Bug Fixes

  • Within the v0.5.1 release, the transaction_id field was erroneously removed from the quickbooks__general_ledger model. This field has since been added back. (#46)

Under the Hood

  • 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)

dbt_quickbooks v0.5.1

Bug Fixes πŸ›πŸͺ›

  • Created indices for double_entry_transactions models. Used row_number functions for payment, bill_payment and transfer models. (#41)
  • Removed transaction index on final quickbooks__general_ledger model, replaced by the newer indices in the sub-ledgers. (#41)
  • Adjusted the bundle_income_accounts cte within the int_quickbooks__invoice_double_entry models to coalesce the parent and sub account id. This correctly removes any duplicate records caused from this cte in a downstream join. (#42)

dbt_quickbooks v0.5.0

🚨 Breaking Changes 🚨

  • 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_quickbooks v0.4.0

πŸŽ‰ dbt v1.0.0 Compatibility πŸŽ‰

🚨 Breaking Changes 🚨

  • Adjusts the require-dbt-version to 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 latest dbt_quickbooks_source package has a dependency on the latest dbt_fivetran_utils. Further, the latest dbt_fivetran_utils package also has a dependency on dbt_utils [">=0.8.0", "<0.9.0"].
    • Please note, if you are installing a version of dbt_utils in your packages.yml that is not in the range above then you will encounter a package dependency error.

dbt_quickbooks v0.1.0 -> v0.3.0

Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you!