diff --git a/.circleci/config.yml b/.circleci/config.yml index 3597538e..56231845 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -15,6 +15,7 @@ jobs: - run: name: "Setup dbt" command: | + sudo apt install libsasl2-dev python3 -m venv venv . venv/bin/activate pip install --upgrade pip setuptools diff --git a/.gitignore b/.gitignore index 2fb3496f..cef00af0 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ target/ dbt_modules/ logs/ .DS_Store -integration_test/.DS_Store \ No newline at end of file +integration_test/.DS_Store +dbt_packages/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 80900147..37f93f0f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,11 @@ -# dbt_quickbooks (next release) +# 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](https://docs.getdbt.com/docs/guides/migration-guide/upgrading-to-1-0-0) 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! \ No newline at end of file +Refer to the relevant release notes on the Github repository for specific details for the previous releases. Thank you! diff --git a/README.md b/README.md index 5823aa1d..93f324ca 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Apache License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![dbt logo and version](https://img.shields.io/static/v1?logo=dbt&label=dbt-version&message=0.20.x&color=orange) +[![Apache License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) # QuickBooks ([docs](https://dbt-quickbooks.netlify.app/)) This package models QuickBooks data from [Fivetran's connector](https://fivetran.com/docs/applications/quickbooks). It uses data in the format described by [this ERD](https://fivetran.com/docs/applications/quickbooks#schemainformation). @@ -27,8 +27,6 @@ This package contains transformation models designed to work simultaneously with | [quickbooks__expenses_sales_enhanced](https://github.com/fivetran/dbt_quickbooks/blob/master/models/quickbooks__expenses_sales.sql) | Table providing enhanced customer, vendor, and account details for each expense and sale transaction. | ## Installation Instructions -`dbt_quickbooks` currently supports `dbt 0.20.x`. - Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions, or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages. Include in your `packages.yml` @@ -36,7 +34,7 @@ Include in your `packages.yml` ```yaml packages: - package: fivetran/quickbooks - version: [">=0.3.0", "<0.4.0"] + version: [">=0.4.0", "<0.5.0"] ``` ## Configuration diff --git a/dbt_project.yml b/dbt_project.yml index 5617a3a4..7fe4a604 100644 --- a/dbt_project.yml +++ b/dbt_project.yml @@ -1,9 +1,9 @@ config-version: 2 name: 'quickbooks' -version: '0.3.0' +version: '0.4.0' -require-dbt-version: ">=0.20.0" +require-dbt-version: [">=1.0.0", "<2.0.0"] models: quickbooks: @@ -18,61 +18,62 @@ models: vars: quickbooks: - account: "{{ ref('stg_quickbooks__account') }}" - address: "{{ ref('stg_quickbooks__address') }}" - bill_line: "{{ ref('stg_quickbooks__bill_line') }}" - bill_linked_txn: "{{ ref('stg_quickbooks__bill_linked_txn') }}" - bill_payment_line: "{{ ref('stg_quickbooks__bill_payment_line') }}" - bill_payment: "{{ ref('stg_quickbooks__bill_payment') }}" - bill: "{{ ref('stg_quickbooks__bill') }}" - bundle_item: "{{ ref('stg_quickbooks__bundle_item') }}" - bundle: "{{ ref('stg_quickbooks__bundle') }}" - credit_memo_line: "{{ ref('stg_quickbooks__credit_memo_line') }}" - credit_memo: "{{ ref('stg_quickbooks__credit_memo') }}" - customer: "{{ ref('stg_quickbooks__customer') }}" - department: "{{ ref('stg_quickbooks__department') }}" - deposit_line: "{{ ref('stg_quickbooks__deposit_line') }}" - deposit: "{{ ref('stg_quickbooks__deposit') }}" - estimate: "{{ ref('stg_quickbooks__estimate') }}" - estimate_line: "{{ ref('stg_quickbooks__estimate_line') }}" - invoice_line: "{{ ref('stg_quickbooks__invoice_line') }}" - invoice_line_bundle: "{{ ref('stg_quickbooks__invoice_line_bundle') }}" - invoice_linked_txn: "{{ ref('stg_quickbooks__invoice_linked_txn') }}" - invoice: "{{ ref('stg_quickbooks__invoice') }}" - item: "{{ ref('stg_quickbooks__item') }}" - journal_entry_line: "{{ ref('stg_quickbooks__journal_entry_line') }}" - journal_entry: "{{ ref('stg_quickbooks__journal_entry') }}" - payment_line: "{{ ref('stg_quickbooks__payment_line') }}" - payment: "{{ ref('stg_quickbooks__payment') }}" - purchase_line: "{{ ref('stg_quickbooks__purchase_line') }}" - purchase: "{{ ref('stg_quickbooks__purchase') }}" - refund_receipt_line: "{{ ref('stg_quickbooks__refund_receipt_line') }}" - refund_receipt: "{{ ref('stg_quickbooks__refund_receipt') }}" - sales_receipt_line: "{{ ref('stg_quickbooks__sales_receipt_line') }}" - sales_receipt: "{{ ref('stg_quickbooks__sales_receipt') }}" - transfer: "{{ ref('stg_quickbooks__transfer') }}" - vendor_credit_line: "{{ ref('stg_quickbooks__vendor_credit_line') }}" - vendor_credit: "{{ ref('stg_quickbooks__vendor_credit') }}" - vendor: "{{ ref('stg_quickbooks__vendor') }}" - + account: "{{ ref('stg_quickbooks__account') }}" + address: "{{ ref('stg_quickbooks__address') }}" + bill_line: "{{ ref('stg_quickbooks__bill_line') }}" + bill_linked_txn: "{{ ref('stg_quickbooks__bill_linked_txn') }}" + bill_payment_line: "{{ ref('stg_quickbooks__bill_payment_line') }}" + bill_payment: "{{ ref('stg_quickbooks__bill_payment') }}" + bill: "{{ ref('stg_quickbooks__bill') }}" + bundle_item: "{{ ref('stg_quickbooks__bundle_item') }}" + bundle: "{{ ref('stg_quickbooks__bundle') }}" + credit_memo_line: "{{ ref('stg_quickbooks__credit_memo_line') }}" + credit_memo: "{{ ref('stg_quickbooks__credit_memo') }}" + customer: "{{ ref('stg_quickbooks__customer') }}" + department: "{{ ref('stg_quickbooks__department') }}" + deposit_line: "{{ ref('stg_quickbooks__deposit_line') }}" + deposit: "{{ ref('stg_quickbooks__deposit') }}" + estimate: "{{ ref('stg_quickbooks__estimate') }}" + estimate_line: "{{ ref('stg_quickbooks__estimate_line') }}" + invoice_line: "{{ ref('stg_quickbooks__invoice_line') }}" + invoice_line_bundle: "{{ ref('stg_quickbooks__invoice_line_bundle') }}" + invoice_linked_txn: "{{ ref('stg_quickbooks__invoice_linked_txn') }}" + invoice: "{{ ref('stg_quickbooks__invoice') }}" + item: "{{ ref('stg_quickbooks__item') }}" + journal_entry_line: "{{ ref('stg_quickbooks__journal_entry_line') }}" + journal_entry: "{{ ref('stg_quickbooks__journal_entry') }}" + payment_line: "{{ ref('stg_quickbooks__payment_line') }}" + payment: "{{ ref('stg_quickbooks__payment') }}" + purchase_line: "{{ ref('stg_quickbooks__purchase_line') }}" + purchase: "{{ ref('stg_quickbooks__purchase') }}" + refund_receipt_line: "{{ ref('stg_quickbooks__refund_receipt_line') }}" + refund_receipt: "{{ ref('stg_quickbooks__refund_receipt') }}" + sales_receipt_line: "{{ ref('stg_quickbooks__sales_receipt_line') }}" + sales_receipt: "{{ ref('stg_quickbooks__sales_receipt') }}" + transfer: "{{ ref('stg_quickbooks__transfer') }}" + vendor_credit_line: "{{ ref('stg_quickbooks__vendor_credit_line') }}" + vendor_credit: "{{ ref('stg_quickbooks__vendor_credit') }}" + vendor: "{{ ref('stg_quickbooks__vendor') }}" + #Variables if your company utilizes the below parent and child transactional tables. - using_address: True - using_bill: True - using_credit_memo: True - using_department: True - using_deposit: True - using_estimate: True - using_invoice: True - using_invoice_bundle: True - using_journal_entry: True - using_payment: True - using_refund_receipt: True - using_transfer: True - using_vendor_credit: True - using_sales_receipt: True + using_address: true + using_bill: true + using_credit_memo: true + using_department: true + using_deposit: true + using_estimate: true + using_invoice: true + using_invoice_bundle: true + using_journal_entry: true + using_payment: true + using_refund_receipt: true + using_transfer: true + using_vendor_credit: true + using_sales_receipt: true analysis-paths: ["analysis"] clean-targets: - - target - - dbt_modules \ No newline at end of file +- target +- dbt_modules +- dbt_packages diff --git a/integration_tests/requirements.txt b/integration_tests/requirements.txt index 1b85aa4f..9edc95a6 100644 --- a/integration_tests/requirements.txt +++ b/integration_tests/requirements.txt @@ -1 +1,6 @@ -dbt~=0.20.0 \ No newline at end of file +dbt-snowflake==1.0.0 +dbt-bigquery==1.0.0 +dbt-redshift==1.0.0 +dbt-postgres==1.0.0 +dbt-spark==1.0.0 +dbt-spark[PyHive]==1.0.0 diff --git a/integration_tests/data/account_data.csv b/integration_tests/seeds/account_data.csv similarity index 100% rename from integration_tests/data/account_data.csv rename to integration_tests/seeds/account_data.csv diff --git a/integration_tests/data/address_data.csv b/integration_tests/seeds/address_data.csv similarity index 100% rename from integration_tests/data/address_data.csv rename to integration_tests/seeds/address_data.csv diff --git a/integration_tests/data/bill_data.csv b/integration_tests/seeds/bill_data.csv similarity index 100% rename from integration_tests/data/bill_data.csv rename to integration_tests/seeds/bill_data.csv diff --git a/integration_tests/data/bill_line_data.csv b/integration_tests/seeds/bill_line_data.csv similarity index 100% rename from integration_tests/data/bill_line_data.csv rename to integration_tests/seeds/bill_line_data.csv diff --git a/integration_tests/data/bill_linked_txn_data.csv b/integration_tests/seeds/bill_linked_txn_data.csv similarity index 100% rename from integration_tests/data/bill_linked_txn_data.csv rename to integration_tests/seeds/bill_linked_txn_data.csv diff --git a/integration_tests/data/bill_payment_data.csv b/integration_tests/seeds/bill_payment_data.csv similarity index 100% rename from integration_tests/data/bill_payment_data.csv rename to integration_tests/seeds/bill_payment_data.csv diff --git a/integration_tests/data/bill_payment_line_data.csv b/integration_tests/seeds/bill_payment_line_data.csv similarity index 100% rename from integration_tests/data/bill_payment_line_data.csv rename to integration_tests/seeds/bill_payment_line_data.csv diff --git a/integration_tests/data/bundle_data.csv b/integration_tests/seeds/bundle_data.csv similarity index 100% rename from integration_tests/data/bundle_data.csv rename to integration_tests/seeds/bundle_data.csv diff --git a/integration_tests/data/bundle_item_data.csv b/integration_tests/seeds/bundle_item_data.csv similarity index 100% rename from integration_tests/data/bundle_item_data.csv rename to integration_tests/seeds/bundle_item_data.csv diff --git a/integration_tests/data/credit_memo_data.csv b/integration_tests/seeds/credit_memo_data.csv similarity index 100% rename from integration_tests/data/credit_memo_data.csv rename to integration_tests/seeds/credit_memo_data.csv diff --git a/integration_tests/data/credit_memo_line_data.csv b/integration_tests/seeds/credit_memo_line_data.csv similarity index 100% rename from integration_tests/data/credit_memo_line_data.csv rename to integration_tests/seeds/credit_memo_line_data.csv diff --git a/integration_tests/data/customer_data.csv b/integration_tests/seeds/customer_data.csv similarity index 100% rename from integration_tests/data/customer_data.csv rename to integration_tests/seeds/customer_data.csv diff --git a/integration_tests/data/department_data.csv b/integration_tests/seeds/department_data.csv similarity index 100% rename from integration_tests/data/department_data.csv rename to integration_tests/seeds/department_data.csv diff --git a/integration_tests/data/deposit_data.csv b/integration_tests/seeds/deposit_data.csv similarity index 100% rename from integration_tests/data/deposit_data.csv rename to integration_tests/seeds/deposit_data.csv diff --git a/integration_tests/data/deposit_line_data.csv b/integration_tests/seeds/deposit_line_data.csv similarity index 100% rename from integration_tests/data/deposit_line_data.csv rename to integration_tests/seeds/deposit_line_data.csv diff --git a/integration_tests/data/estimate_data.csv b/integration_tests/seeds/estimate_data.csv similarity index 100% rename from integration_tests/data/estimate_data.csv rename to integration_tests/seeds/estimate_data.csv diff --git a/integration_tests/data/estimate_line_data.csv b/integration_tests/seeds/estimate_line_data.csv similarity index 100% rename from integration_tests/data/estimate_line_data.csv rename to integration_tests/seeds/estimate_line_data.csv diff --git a/integration_tests/data/invoice_data.csv b/integration_tests/seeds/invoice_data.csv similarity index 100% rename from integration_tests/data/invoice_data.csv rename to integration_tests/seeds/invoice_data.csv diff --git a/integration_tests/data/invoice_line_bundle_data.csv b/integration_tests/seeds/invoice_line_bundle_data.csv similarity index 100% rename from integration_tests/data/invoice_line_bundle_data.csv rename to integration_tests/seeds/invoice_line_bundle_data.csv diff --git a/integration_tests/data/invoice_line_data.csv b/integration_tests/seeds/invoice_line_data.csv similarity index 100% rename from integration_tests/data/invoice_line_data.csv rename to integration_tests/seeds/invoice_line_data.csv diff --git a/integration_tests/data/invoice_linked_txn_data.csv b/integration_tests/seeds/invoice_linked_txn_data.csv similarity index 100% rename from integration_tests/data/invoice_linked_txn_data.csv rename to integration_tests/seeds/invoice_linked_txn_data.csv diff --git a/integration_tests/data/item_data.csv b/integration_tests/seeds/item_data.csv similarity index 100% rename from integration_tests/data/item_data.csv rename to integration_tests/seeds/item_data.csv diff --git a/integration_tests/data/journal_entry_data.csv b/integration_tests/seeds/journal_entry_data.csv similarity index 100% rename from integration_tests/data/journal_entry_data.csv rename to integration_tests/seeds/journal_entry_data.csv diff --git a/integration_tests/data/journal_entry_line_data.csv b/integration_tests/seeds/journal_entry_line_data.csv similarity index 100% rename from integration_tests/data/journal_entry_line_data.csv rename to integration_tests/seeds/journal_entry_line_data.csv diff --git a/integration_tests/data/payment_data.csv b/integration_tests/seeds/payment_data.csv similarity index 100% rename from integration_tests/data/payment_data.csv rename to integration_tests/seeds/payment_data.csv diff --git a/integration_tests/data/payment_line_data.csv b/integration_tests/seeds/payment_line_data.csv similarity index 100% rename from integration_tests/data/payment_line_data.csv rename to integration_tests/seeds/payment_line_data.csv diff --git a/integration_tests/data/purchase_data.csv b/integration_tests/seeds/purchase_data.csv similarity index 100% rename from integration_tests/data/purchase_data.csv rename to integration_tests/seeds/purchase_data.csv diff --git a/integration_tests/data/purchase_line_data.csv b/integration_tests/seeds/purchase_line_data.csv similarity index 100% rename from integration_tests/data/purchase_line_data.csv rename to integration_tests/seeds/purchase_line_data.csv diff --git a/integration_tests/data/purchase_order_data.csv b/integration_tests/seeds/purchase_order_data.csv similarity index 100% rename from integration_tests/data/purchase_order_data.csv rename to integration_tests/seeds/purchase_order_data.csv diff --git a/integration_tests/data/purchase_order_line_data.csv b/integration_tests/seeds/purchase_order_line_data.csv similarity index 100% rename from integration_tests/data/purchase_order_line_data.csv rename to integration_tests/seeds/purchase_order_line_data.csv diff --git a/integration_tests/data/refund_receipt_data.csv b/integration_tests/seeds/refund_receipt_data.csv similarity index 100% rename from integration_tests/data/refund_receipt_data.csv rename to integration_tests/seeds/refund_receipt_data.csv diff --git a/integration_tests/data/refund_receipt_line_data.csv b/integration_tests/seeds/refund_receipt_line_data.csv similarity index 100% rename from integration_tests/data/refund_receipt_line_data.csv rename to integration_tests/seeds/refund_receipt_line_data.csv diff --git a/integration_tests/data/sales_receipt_data.csv b/integration_tests/seeds/sales_receipt_data.csv similarity index 100% rename from integration_tests/data/sales_receipt_data.csv rename to integration_tests/seeds/sales_receipt_data.csv diff --git a/integration_tests/data/sales_receipt_line_data.csv b/integration_tests/seeds/sales_receipt_line_data.csv similarity index 100% rename from integration_tests/data/sales_receipt_line_data.csv rename to integration_tests/seeds/sales_receipt_line_data.csv diff --git a/integration_tests/data/transfer_data.csv b/integration_tests/seeds/transfer_data.csv similarity index 100% rename from integration_tests/data/transfer_data.csv rename to integration_tests/seeds/transfer_data.csv diff --git a/integration_tests/data/vendor_credit_data.csv b/integration_tests/seeds/vendor_credit_data.csv similarity index 100% rename from integration_tests/data/vendor_credit_data.csv rename to integration_tests/seeds/vendor_credit_data.csv diff --git a/integration_tests/data/vendor_credit_line_data.csv b/integration_tests/seeds/vendor_credit_line_data.csv similarity index 100% rename from integration_tests/data/vendor_credit_line_data.csv rename to integration_tests/seeds/vendor_credit_line_data.csv diff --git a/integration_tests/data/vendor_data.csv b/integration_tests/seeds/vendor_data.csv similarity index 100% rename from integration_tests/data/vendor_data.csv rename to integration_tests/seeds/vendor_data.csv diff --git a/packages.yml b/packages.yml index e58b3d92..8f3c59c0 100644 --- a/packages.yml +++ b/packages.yml @@ -1,3 +1,3 @@ packages: - - package: fivetran/quickbooks_source - version: [">=0.3.0","<0.4.0"] \ No newline at end of file +- package: fivetran/quickbooks_source + version: [">=0.4.0", "<0.5.0"]