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/department id casting #44

Merged
merged 5 commits into from
Apr 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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`
fivetran-avinash marked this conversation as resolved.
Show resolved Hide resolved
- `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 README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Include the following QuickBooks package version in your `packages.yml` file.
```yaml
packages:
- package: fivetran/quickbooks_source
version: [">=0.7.0", "<0.8.0"]
version: [">=0.8.0", "<0.9.0"]
```

## Step 3: Define database and schema variables
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2
name: 'quickbooks_source'

version: '0.7.1'
version: '0.8.0'
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.

2 changes: 1 addition & 1 deletion integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: 'quickbooks_source_integration_tests'
version: '0.7.1'
version: '0.8.0'

profile: 'integration_tests'
config-version: 2
Expand Down
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