Skip to content
Closed
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3e354c7
Update invoice tax line data
fivetran-avinash Jul 9, 2025
95c441f
Update seed files to test new invoice tax line logic
fivetran-avinash Jul 10, 2025
771f86b
Documentation
fivetran-avinash Jul 11, 2025
2512e79
Q2 FY26: Apply automated update.
fivetran-catfritz Jul 16, 2025
60cb98e
Merge conflicts
fivetran-avinash Jul 16, 2025
be5ae28
docs
fivetran-avinash Jul 16, 2025
1685748
Add all tax lines
fivetran-avinash Jul 17, 2025
7219aea
Variable flip to false enable
fivetran-avinash Jul 17, 2025
49822ad
New seed sources
fivetran-avinash Jul 17, 2025
b125eb1
Update integration_tests data/config
fivetran-avinash Jul 17, 2025
ecb8196
update quickstart.yml and add variables
fivetran-avinash Jul 17, 2025
c68ebdf
Model fixes
fivetran-avinash Jul 18, 2025
153e8cb
comment out disabled models
fivetran-avinash Jul 21, 2025
82822a1
Q2 FY26: Update auto-release workflow only.
fivetran-catfritz Jul 22, 2025
0a6d16a
PR changes plus new tax line PR updates
fivetran-avinash Jul 29, 2025
e52d2d6
Apply new variable config logic to double entry Models + resolve merg…
fivetran-avinash Jul 30, 2025
a5c6f5c
Resolve merge conflicts from docs generator PR
fivetran-avinash Jul 30, 2025
3c32e2f
small change to merge
fivetran-avinash Jul 30, 2025
685cf75
small change to merge
fivetran-avinash Jul 30, 2025
d2b70af
Trigger merge to close PR (#170)
fivetran-data-model-bot Jul 30, 2025
5cdeecb
packages.yml
fivetran-avinash Jul 31, 2025
b780f1b
PR review
fivetran-avinash Aug 5, 2025
921024c
PR re-review
fivetran-avinash Aug 6, 2025
74129d2
PR notes
fivetran-avinash Aug 7, 2025
edd4831
pin to pre-release package
fivetran-avinash Aug 12, 2025
1cc667b
address merge conflicts
fivetran-joemarkiewicz Aug 26, 2025
8a47956
cleanup merge conflicts
fivetran-joemarkiewicz Aug 26, 2025
dd6bd1d
bugfix/invoice-bundles (#175)
fivetran-joemarkiewicz Aug 27, 2025
1ff58e3
update for pre-release
fivetran-avinash Aug 27, 2025
3d22662
packages for docs gen
fivetran-avinash Aug 28, 2025
166ed21
Generate dbt docs via GitHub Actions
github-actions[bot] Aug 28, 2025
b317823
changelog + packages
fivetran-avinash Aug 28, 2025
4488fa1
Merge branch 'feature/add-all-tax-lines' of https://github.com/fivetr…
fivetran-avinash Aug 28, 2025
8d2f73d
Generate dbt docs via GitHub Actions
github-actions[bot] Aug 28, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .buildkite/scripts/run_models.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ dbt seed --target "$db" --full-refresh
dbt source freshness --target "$db" || echo "...Only verifying freshness runs..."
dbt run --target "$db" --full-refresh
dbt test --target "$db"
dbt run --vars '{using_credit_card_payment_txn: true, using_address: false, using_bill: false, using_credit_memo: false, using_department: false, using_deposit: false, using_estimate: false, using_invoice: false, using_invoice_bundle: false, using_journal_entry: false, using_payment: false, using_refund_receipt: false, using_transfer: false, using_vendor_credit: false, using_sales_receipt: false}' --target "$db" --full-refresh
dbt run --vars '{using_credit_card_payment_txn: true, using_address: false, using_bill: false, using_credit_memo: false, using_department: false, using_deposit: false, using_estimate: false, using_invoice: false, using_invoice_bundle: false, using_invoice_tax_line: true, using_journal_entry: false, using_journal_entry_tax_line: true, using_payment: false, using_purchase_tax_line: true, using_refund_receipt: false, using_refund_receipt_tax_line: true, using_sales_receipt: false, using_sales_receipt_tax_line: true, using_tax_agency: true, using_tax_rate: true, using_transfer: false, using_vendor_credit: false}' --target "$db" --full-refresh
dbt test --target "$db"

dbt run-operation fivetran_utils.drop_schemas_automation --target "$db"
11 changes: 6 additions & 5 deletions .github/workflows/auto-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@ on:
pull_request:
types:
- closed
branches:
- main
- labeled

jobs:
call-workflow-passing-data:
if: github.event.pull_request.merged
release:
if: |
(github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main') ||
github.event.label.name == 'pre-release'
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
secrets: inherit
secrets: inherit
13 changes: 13 additions & 0 deletions .github/workflows/generate-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: 'generate dbt docs'
on:
pull_request:
types:
- labeled

jobs:
generate-docs:
if: github.event.label.name == 'docs:ready'
uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@main
secrets: inherit
with:
schema_var_name: quickbooks_schema
75 changes: 70 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,73 @@

target/
# dbt
**/package-lock.yml
package-lock.yml
.dbt/
dbt_modules/
dbt_packages/
logs/
profiles.yml
target/
*.log

# IDE files
.idea/
.vscode/
*~
*.swp
*.swo

# Jupyter Notebook
.ipynb_checkpoints

# OS generated files
**/.DS_Store
.DS_Store
integration_tests/.DS_Store
dbt_packages/
env/
.Spotlight-V100
.Trashes
._*
Thumbs.db
ehthumbs.db

# Python
*.egg
*.egg-info/
*.py[cod]
*.so
*$py.class
.Python
__pycache__/
build/
develop-eggs/
dist/
downloads/
eggs/
.env
.installed.cfg
lib/
lib64/
MANIFEST
parts/
sdist/
var/
wheels/

# Secrets and credentials
.env.*
.secrets
credentials.json
service-account.json

# Temporary files
.cache/
*.temp
*.tmp

# Virtual environments
.conda/
.env
.venv
ENV/
env/
env.bak/
venv/
venv.bak/
14 changes: 14 additions & 0 deletions .quickstart/quickstart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,29 @@ table_variables:
- bundle_item
- bundle
- invoice_line_bundle
using_invoice_tax_line:
- invoice_tax_line
using_journal_entry:
- journal_entry_line
- journal_entry
using_journal_entry_tax_line:
- journal_entry_tax_line
using_payment:
- payment_line
- payment
using_purchase_tax_line:
- purchase_tax_line
using_refund_receipt:
- refund_receipt_line
- refund_receipt
using_refund_receipt_tax_line:
- refund_receipt_tax_line
using_sales_receipt_tax_line:
- sales_receipt_tax_line
using_tax_agency:
- tax_agency
using_tax_rate:
- tax_rate
using_transfer:
- transfer
using_vendor_credit:
Expand Down
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,56 @@
# dbt_quickbooks v0.21.0-a1
[PR #166](https://github.com/fivetran/dbt_quickbooks/pull/166) 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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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`](https://fivetran.github.io/dbt_quickbooks_source/#!/model/model.quickbooks_source.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.) |

## 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](https://github.com/fivetran/dbt_quickbooks_source/blob/main/README.md#step-4-enablingdisabling-models) 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 `run_models.sh` to execute for when the new variables are enabled.
- Removed redundant default variable configs from the `dbt_project.yml`.

[PR #170](https://github.com/fivetran/dbt_quickbooks/pull/170) includes the following updates:
Comment thread
fivetran-joemarkiewicz marked this conversation as resolved.
Outdated

### Under the Hood - July 2025 Updates
- Updated conditions in `.github/workflows/auto-release.yml`.
- Added `.github/workflows/generate-docs.yml`.
- Added `+docs: show: False` to `integration_tests/dbt_project.yml`.
- Migrated `flags` (e.g., `send_anonymous_usage_stats`, `use_colors`) from `sample.profiles.yml` to `integration_tests/dbt_project.yml`.
- Updated `maintainer_pull_request_template.md` with improved checklist.
- Updated `.gitignore` to exclude additional DBT, Python, and system artifacts.

# dbt_quickbooks v0.20.1
[PR #169](https://github.com/fivetran/dbt_quickbooks/pull/169) includes the following updates:

Expand Down
23 changes: 15 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,11 @@ Include the following QuickBooks package version in your `packages.yml` file.
```yaml
packages:
- package: fivetran/quickbooks
version: [">=0.20.0", "<0.21.0"] # we recommend using ranges to capture non-breaking changes automatically
version: 0.21.0-a1 # we recommend using ranges to capture non-breaking changes automatically
```

Do NOT include the `quickbooks_source` package in this file. The transformation package itself has a dependency on it and will install the source package as well.


### Step 3: Define database and schema variables
By default, this package runs using your destination and the `quickbooks` schema of your [target database](https://docs.getdbt.com/docs/running-a-dbt-project/using-the-command-line-interface/configure-your-profile). If this is not where your QuickBooks data is (for example, if your QuickBooks schema is named `quickbooks_fivetran`), add the following configuration to your root `dbt_project.yml` file:

Expand Down Expand Up @@ -114,6 +113,13 @@ vars:
using_sales_receipt: false # disable if you don't have sales receipts in QuickBooks
using_credit_card_payment_txn: true # enable if you want to include credit card payment transactions in your staging models
using_purchase_order: true #enable if you want to include purchase orders in your staging models
using_invoice_tax_line: true #enable if you have invoice tax lines in QuickBooks
using_journal_entry_tax_line: true # enable if you have journal entry tax lines in QuickBooks
using_purchase_tax_line: true # enable if you have purchase tax lines in QuickBooks
using_refund_receipt_tax_line: true # enable if you have refund receipt tax lines in QuickBooks
using_sales_receipt_tax_line: true # enable if you have sales receipt tax lines in QuickBooks
using_tax_agency: true #enable if you have tax agencies in QuickBooks
using_tax_rate: true #enable if you have tax rates in QuickBooks
```

### (Optional) Step 5: Additional Configurations
Expand All @@ -133,7 +139,7 @@ vars:
```

#### Configuring Account Type Names
Within a few of the double entry models in this package a mapping takes place to assign certain transaction type's debits/credits to the appropriate offset account (ie. Accounts Payable, Accounts Receivable, Undeposited Funds, and SalesOfProductIncome) reference. While our current filtered logic within our intermediate models account for the default values, it's possible your use case relies on different account types to reference.
Within a few of the double entry models in this package a mapping takes place to assign certain transaction type's debits/credits to the appropriate offset account (ie. Accounts Payable, Accounts Receivable, Global Tax Payable, Sales Tax Payable, Undeposited Funds, and SalesOfProductIncome) reference. While our current filtered logic within our intermediate models account for the default values, it's possible your use case relies on different account types to reference.
Comment thread
fivetran-joemarkiewicz marked this conversation as resolved.

If you have a different value to reference for each type, you will need to configure the `account_type` and `account_sub_type` variables that account for these variables in your `dbt_project.yml`.

Expand All @@ -143,6 +149,8 @@ vars:
quickbooks__accounts_receivable_reference: account_receivable_value # 'Accounts Receivable' is the default filter set for the account_type reference.
quickbooks__undeposited_funds_reference: account_undeposited_funds_value # 'UndepositedFunds' is the default filter set for the account_subtype reference.
quickbooks__sales_of_product_income_reference: account_sales_of_product_income_value # 'SalesOfProductIncome' is the default filter set for the account_subtype reference.
quickbooks__global_tax_account_reference: global_tax_account_value # 'Global Tax Payable' is the default filter set for the account name reference.
quickbooks__sales_tax_account_reference: sales_tax_account_value # 'Sales Tax Payable' is the default filter set for the account name reference.
```

#### Customize the Cash Flow Model
Expand Down Expand Up @@ -171,12 +179,12 @@ These are our recommended best practices to follow with your seed file--you can

### Customize the account ordering of your financial models.
[The current default numbering for ordinals](https://github.com/fivetran/dbt_quickbooks/blob/main/models/quickbooks__general_ledger_by_period.sql#L44-L50) is based on best practices for balance sheets and profit-and-loss statements in accounting. You can see these ordinals in action in the `quickbooks__general_ledger_by_period`, `quickbooks__balance_sheet` and `quickbooks__profit_and_loss` models. The ordinals are assigned off of the `account_class` values.

If you'd like to modify this, take the following steps:

1) Import a csv with fields into root (not the dbt package) `seeds` folder, then configure the `financial_statement_ordinal` variable in your `dbt_project.yml` to reference the seed file name.
- For example, if you created a seed file named `quickbooks_ordinals.csv`, then you would edit the `financial_statement_ordinal` in your root `dbt_project.yml` as such.

```yml
vars:
financial_statement_ordinal: "{{ ref('quickbooks_ordinals') }}"
Expand Down Expand Up @@ -209,7 +217,7 @@ models:
#### Change the source table references
If an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable:
> IMPORTANT: See this project's [`dbt_project.yml`](https://github.com/fivetran/dbt_quickbooks_source/blob/main/dbt_project.yml) variable declarations to see the expected names.

```yml
vars:
quickbooks_<default_source_table_name>_identifier: your_table_name
Expand All @@ -219,7 +227,6 @@ vars:

Fivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core setup guides](https://fivetran.com/docs/transformations/dbt#setupguide).


### (Optional) Step 7: Validate your data
After running the models within this package, you may want to compare the baseline financial statement totals from the data provided against what you expect. You can make use of the [analysis functionality of dbt](https://docs.getdbt.com/docs/building-a-dbt-project/analyses/) and run pre-written SQL to test these values. The SQL files within the [analysis](https://github.com/fivetran/dbt_quickbooks/blob/master/analysis) folder contain SQL queries you may compile to generate balance sheet and income statement values. You can then tie these generated values to your expected ones and confirm the values provided in this package are accurate.

Expand All @@ -230,7 +237,7 @@ This dbt package is dependent on the following dbt packages. These dependencies
```yml
packages:
- package: fivetran/quickbooks_source
version: [">=0.13.0", "<0.14.0"]
version: 0.14.0-a1

- package: fivetran/fivetran_utils
version: [">=0.4.0", "<0.5.0"]
Expand Down
Loading