Skip to content

Commit

Permalink
Merge pull request #44 from fivetran/feature/department-id-casting
Browse files Browse the repository at this point in the history
Feature/department id casting
  • Loading branch information
fivetran-joemarkiewicz authored Apr 19, 2023
2 parents 698652d + 82ba6e5 commit af83c37
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 17 deletions.
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# dbt_quickbooks_source v0.8.0
[PR #44](https://github.com/fivetran/dbt_quickbooks_source/pull/44) includes the following updates:
## Under the Hood
- Casted the `department_id` within the following staging models to be of type string. This ensures downstream unions on this type are consistent and of the same type.
- `stg_quickbooks__bill`
- `stg_quickbooks__bill_payment`
- `stg_quickbooks__credit_memo`
- `stg_quickbooks__department`
- `stg_quickbooks__deposit`
- `stg_quickbooks__estimate`
- `stg_quickbooks__invoice`
- `stg_quickbooks__journal_entry_line`
- `stg_quickbooks__purchase`
- `stg_quickbooks__refund_receipt`
- `stg_quickbooks__sales_receipt`
- `stg_quickbooks__vendor_credit`

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

2 changes: 1 addition & 1 deletion models/stg_quickbooks__bill.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final as (
balance,
cast(doc_number as {{ dbt.type_string() }}) as doc_number,
currency_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
due_date as due_date_at,
transaction_date,
exchange_rate,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__bill_payment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final as (
cast(credit_card_account_id as {{ dbt.type_string() }}) as credit_card_account_id,
exchange_rate,
currency_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
pay_type,
total_amount,
transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__credit_memo.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final as (
total_amount,
currency_id,
cast(class_id as {{ dbt.type_string() }}) as class_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(customer_id as {{ dbt.type_string() }}) as customer_id,
exchange_rate,
transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__department.sql
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ fields as (
final as (

select
id as department_id,
cast(id as {{ dbt.type_string() }}) as department_id,
active as is_active,
created_at,
updated_at,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__deposit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ final as (
cast(account_id as {{ dbt.type_string() }}) as account_id,
created_at,
currency_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
total_amount,
transaction_date,
transaction_status,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__estimate.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final as (
created_at,
currency_id,
customer_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
due_date,
total_amount,
transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__invoice.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final as (
cast(doc_number as {{ dbt.type_string() }}) as doc_number,
total_amount,
currency_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(deposit_to_account_id as {{ dbt.type_string() }}) as deposit_to_account_id,
exchange_rate,
transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__journal_entry_line.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final as (
cast(account_id as {{ dbt.type_string() }}) as account_id,
amount,
cast(customer_id as {{ dbt.type_string() }}) as customer_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(class_id as {{ dbt.type_string() }}) as class_id,
description,
billable_status,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__purchase.sql
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ final as (
credit,
total_amount,
payment_type,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(customer_id as {{ dbt.type_string() }}) as customer_id,
cast(vendor_id as {{ dbt.type_string() }}) as vendor_id,
transaction_date,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__refund_receipt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ final as (
cast(class_id as {{ dbt.type_string() }}) as class_id,
cast(deposit_to_account_id as {{ dbt.type_string() }}) as deposit_to_account_id,
created_at,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(customer_id as {{ dbt.type_string() }}) as customer_id,
currency_id,
exchange_rate,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__sales_receipt.sql
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ final as (
cast(deposit_to_account_id as {{ dbt.type_string() }}) as deposit_to_account_id,
created_at,
cast(customer_id as {{ dbt.type_string() }}) as customer_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
cast(class_id as {{ dbt.type_string() }}) as class_id,
currency_id,
exchange_rate,
Expand Down
2 changes: 1 addition & 1 deletion models/stg_quickbooks__vendor_credit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ final as (
exchange_rate,
created_at,
cast(payable_account_id as {{ dbt.type_string() }}) as payable_account_id,
department_id,
cast(department_id as {{ dbt.type_string() }}) as department_id,
private_note,
transaction_date,
cast(vendor_id as {{ dbt.type_string() }}) as vendor_id,
Expand Down

0 comments on commit af83c37

Please sign in to comment.