Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/detail-type-addition #43

Merged
merged 12 commits into from
Apr 19, 2023
Merged
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# dbt_quickbooks_source v0.7.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be v0.8.0 now (or nothing)? The dbt_project.yml reflects the version. I'm guessing this is getting overwritten in the final release branch so not a huge deal either way.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I started adjusting these but then left them as we were going to change them in the release branch anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to be in line with 0.8.0 release

[PR #43](https://github.com/fivetran/dbt_quickbooks_source/pull/43) includes the following udpates:
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved
## 🎉 Feature Updates 🎉
- Addition of the `detail_type` field within the `stg_quickbooks__invoice_line` model. This field will help identify the type of invoice line in the context of the entire invoice.

# dbt_quickbooks_source v0.7.1
## 🎉 Feature Updates 🎉
- Removed not-null test for `bill_payment_id` field in `stg_quickbooks__bill_linked_txn` to account for bills with empty bill payment values. ([#41](https://github.com/fivetran/dbt_quickbooks_source/pull/41))
Expand Down
1 change: 1 addition & 0 deletions dbt_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ config-version: 2
name: 'quickbooks_source'

version: '0.8.0'

fivetran-avinash marked this conversation as resolved.
Show resolved Hide resolved
require-dbt-version: [">=1.3.0", "<2.0.0"]

models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: 'quickbooks_source_integration_tests'
version: '0.8.0'


fivetran-avinash marked this conversation as resolved.
Show resolved Hide resolved
profile: 'integration_tests'
config-version: 2

Expand Down
22 changes: 11 additions & 11 deletions integration_tests/seeds/invoice_line_data.csv
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
index,invoice_id,_fivetran_synced,amount,bundle_id,bundle_quantity,description,description_service_date,description_tax_code_id,discount_account_id,discount_class_id,discount_discount_percent,discount_percent_based,discount_tax_code_id,sales_item_account_id,sales_item_class_id,sales_item_discount_amount,sales_item_discount_rate,sales_item_item_id,sales_item_quantity,sales_item_service_date,sales_item_tax_code_id,sales_item_unit_price,sub_total_item_id,item_id,quantity,tax_code_id,account_id
0,35647,2021-01-18 6:16:26,27381.64,211,0.6993497,,,,,,,,,,,,,,,,,,,,,,
5,35647,2021-01-18 6:16:26,24850,,,,,,,,,,,,,,,,,,,,,,,,
2,35647,2021-01-18 6:16:26,0,,,0f9d69329f489637a6ae046f4091e365,,,,,,,,,,,,18,,,NON,,,,,,
4,35647,2021-01-18 6:16:26,0,,,553bf7b55f32b6f7074ae45d987530ce,,,,,,,,,,,,18,,,NON,,,,,,
3,35647,2021-01-18 6:16:26,-4280.01,,,2ae778d8d42424d33b656517b2c892bf,,,,,,,,224,,,,34,0.7,,NON,-6120,,,,,
1,35647,2021-01-18 6:16:26,1748.37,,,,,,,,,,,211,,,,227,0.7,,NON,2500,,,,,
0,40092,2021-01-19 2:18:38,21437.5,212,0.5,,,,,,,,,,,,,,,,,,,,,,
10,40092,2021-01-19 2:18:38,17181.75,,,,,,,,,,,,,,,,,,,,,,,,
4,40092,2021-01-19 2:18:38,0,,,7f3c88bf068c8edd47367bd68c01cd8f,,,,,,,,,,,,18,,,NON,,,,,,
7,40092,2021-01-19 2:18:38,0,,,703d01ddc458e55f5b43da8c88aaa581,,,,,,,,,,,,18,,,NON,,,,,,
index,invoice_id,_fivetran_synced,amount,bundle_id,bundle_quantity,description,description_service_date,description_tax_code_id,discount_account_id,discount_class_id,discount_discount_percent,discount_percent_based,discount_tax_code_id,sales_item_account_id,sales_item_class_id,sales_item_discount_amount,sales_item_discount_rate,sales_item_item_id,sales_item_quantity,sales_item_service_date,sales_item_tax_code_id,sales_item_unit_price,sub_total_item_id,item_id,quantity,tax_code_id,account_id,detail_type
0,35647,2021-01-18 6:16:26,27381.64,211,0.6993497,,,,,,,,,,,,,,,,,,,,,,,SalesItemLineDetail
5,35647,2021-01-18 6:16:26,24850,,,,,,,,,,,,,,,,,,,,,,,,,
2,35647,2021-01-18 6:16:26,0,,,0f9d69329f489637a6ae046f4091e365,,,,,,,,,,,,18,,,NON,,,,,,,SalesItemLineDetail
fivetran-avinash marked this conversation as resolved.
Show resolved Hide resolved
4,35647,2021-01-18 6:16:26,0,,,553bf7b55f32b6f7074ae45d987530ce,,,,,,,,,,,,18,,,NON,,,,,,,
3,35647,2021-01-18 6:16:26,-4280.01,,,2ae778d8d42424d33b656517b2c892bf,,,,,,,,224,,,,34,0.7,,NON,-6120,,,,,,
1,35647,2021-01-18 6:16:26,1748.37,,,,,,,,,,,211,,,,227,0.7,,NON,2500,,,,,,
0,40092,2021-01-19 2:18:38,21437.5,212,0.5,,,,,,,,,,,,,,,,,,,,,,,SalesItemLineDetail
10,40092,2021-01-19 2:18:38,17181.75,,,,,,,,,,,,,,,,,,,,,,,,,
4,40092,2021-01-19 2:18:38,0,,,7f3c88bf068c8edd47367bd68c01cd8f,,,,,,,,,,,,18,,,NON,,,,,,,SubTotalLine
7,40092,2021-01-19 2:18:38,0,,,703d01ddc458e55f5b43da8c88aaa581,,,,,,,,,,,,18,,,NON,,,,,,,SubTotalLine
1 change: 1 addition & 0 deletions macros/get_invoice_line_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
{"name": "discount_discount_percent", "datatype": dbt.type_float()},
{"name": "discount_percent_based", "datatype": "boolean"},
{"name": "discount_tax_code_id", "datatype": dbt.type_string()},
{"name": "detail_type", "datatype": dbt.type_string()},
{"name": "index", "datatype": dbt.type_string()},
{"name": "invoice_id", "datatype": dbt.type_string()},
{"name": "item_id", "datatype": dbt.type_string()},
Expand Down
2 changes: 2 additions & 0 deletions models/src_quickbooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ sources:
description: "{{ doc('item_id') }} associated with the invoice line."
- name: quantity
description: Quantity of the item included on the invoice line.
- name: detail_type
description: Individual line items of a transaction. Valid Line types include SalesItemLine, GroupLine, DescriptionOnlyLine (also used for inline Subtotal lines), DiscountLine and SubTotalLine (used for the overall transaction).
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

- name: invoice_line_bundle
identifier: "{{ var('quickbooks_invoice_line_bundle_identifier', 'invoice_line_bundle') }}"
Expand Down
2 changes: 2 additions & 0 deletions models/stg_quickbooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,6 +582,8 @@ models:
description: Reference to the item associated with the invoice line.
- name: quantity
description: Quantity of the item included on the invoice line.
- name: detail_type
description: Individual line items of a transaction. Valid Line types include SalesItemLine, GroupLine, DescriptionOnlyLine (also used for inline Subtotal lines), DiscountLine and SubTotalLine (used for the overall transaction).
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

- name: stg_quickbooks__invoice_line_bundle
description: "{{ doc('invoice_line_bundle_table') }}"
Expand Down
5 changes: 3 additions & 2 deletions models/stg_quickbooks__invoice_line.sql
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ with base as (

),

fields as (
fields as (

select
/*
Expand Down Expand Up @@ -46,7 +46,8 @@ final as (
cast(sales_item_class_id as {{ dbt.type_string() }}) as sales_item_class_id,
sales_item_quantity,
sales_item_unit_price,
discount_account_id,
cast(discount_account_id as {{ dbt.type_string() }}) as discount_account_id,
detail_type,
cast(discount_class_id as {{ dbt.type_string() }}) as discount_class_id,
description,
quantity,
Expand Down