Skip to content

Commit

Permalink
Merge pull request #36 from fivetran/bugfix/consolidate-exch-accounti…
Browse files Browse the repository at this point in the history
…ng-book-id

Bugfix/consolidate exch accounting book
  • Loading branch information
fivetran-reneeli authored Aug 9, 2023
2 parents 546cc57 + c451f35 commit 8255c87
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 24 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
# dbt_netsuite_source v0.7.0
## 🚨 Breaking Changes 🚨:

- Brought in `accounting_book_id` (accountingbook) to the `stg_netsuite2__consolidated_exchange_rates` model. ([PR #36](https://github.com/fivetran/dbt_netsuite_source/pull/36))
- Due to logic within the dbt_netsuite v0.8.1 package version, this update will result in an ambiguous columns error. Therefore, this update is treated as a breaking change.

# dbt_netsuite_source v0.6.3

[PR #35](https://github.com/fivetran/dbt_netsuite_source/pull/35) applies the following changes:

## 🎉 Feature Updates 🎉
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ If you are **not** using the [Netsuite transformation package](https://github.c
```yaml
packages:
- package: fivetran/netsuite_source
version: [">=0.6.0", "<0.7.0"]
version: [">=0.7.0", "<0.8.0"]
```

## Step 3: Define Netsuite.com or Netsuite2 Source
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
require-dbt-version: [">=1.3.0", "<2.0.0"]
name: 'netsuite_source'
version: '0.6.3'
version: '0.7.0'

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

Large diffs are not rendered by default.

6 changes: 3 additions & 3 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.

10 changes: 5 additions & 5 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: netsuite_source_integration_tests_2
schema: netsuite_source_integration_tests_3
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: netsuite_source_integration_tests_2
schema: netsuite_source_integration_tests_3
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: netsuite_source_integration_tests_2
schema: netsuite_source_integration_tests_3
threads: 8
postgres:
type: postgres
Expand All @@ -42,13 +42,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: netsuite_source_integration_tests_2
schema: netsuite_source_integration_tests_3
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: netsuite_source_integration_tests_2
schema: netsuite_source_integration_tests_3
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
4 changes: 2 additions & 2 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: 'netsuite_source_integration_tests'

version: '0.6.3'
version: '0.7.0'

profile: 'integration_tests'
config-version: 2
vars:
netsuite_source:
netsuite_schema: netsuite_source_integration_tests_2
netsuite_schema: netsuite_source_integration_tests_3
netsuite_data_model_override: netsuite
netsuite_accounting_books_identifier: "netsuite_accounting_books_data"
netsuite_accounting_periods_identifier: "netsuite_accounting_periods_data"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
id,_fivetran_deleted,_fivetran_synced,averagerate,currentrate,date_deleted,externalid,fromcurrency,fromsubsidiary,historicalrate,postingperiod,tocurrency,tosubsidiary
1979,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,289,1,1
1944,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,282,1,1
1930,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,280,1,1
1958,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,285,1,1
1951,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,284,1,1
id,_fivetran_deleted,_fivetran_synced,averagerate,currentrate,date_deleted,externalid,fromcurrency,fromsubsidiary,historicalrate,postingperiod,tocurrency,tosubsidiary,accountingbook
1979,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,289,1,1,1
1944,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,282,1,1,1
1930,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,280,1,1,1
1958,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,285,1,1,1
1951,FALSE,2022-07-10 22:16:59,1,1,,,1,1,1,284,1,1,1
1 change: 1 addition & 0 deletions macros/get_consolidated_exchange_rates_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
{"name": "fromsubsidiary", "datatype": dbt.type_int()},
{"name": "historicalrate", "datatype": dbt.type_float()},
{"name": "id", "datatype": dbt.type_int()},
{"name": "accountingbook", "datatype": dbt.type_int()},
{"name": "postingperiod", "datatype": dbt.type_int()},
{"name": "tocurrency", "datatype": dbt.type_int()},
{"name": "tosubsidiary", "datatype": dbt.type_int()}
Expand Down
4 changes: 3 additions & 1 deletion models/netsuite2/src_netsuite2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ sources:
description: The current rate associated with the exchange rate.
- name: averagerate
description: The consolidated exchange rates average rate.
- name: accountingbook
description: "{{ doc('accounting_book_id') }}"
- name: historicalrate
description: The historical rate of the exchange rate.

Expand Down Expand Up @@ -478,7 +480,7 @@ sources:
- name: netamount
description: The net amount of the transaction line.
- name: accountingbook
description: Reference to the accounting book of the entry.
description: "{{ doc('accounting_book_id') }}"
- name: account
description: Reference to the account associated with the entry.
- name: posting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ final as (
fromsubsidiary as from_subsidiary_id,
tocurrency as to_currency_id,
tosubsidiary as to_subsidiary_id,
accountingbook as accounting_book_id,
currentrate as current_rate,
averagerate as average_rate,
historicalrate as historical_rate
Expand Down
6 changes: 4 additions & 2 deletions models/stg_netsuite2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -199,13 +199,15 @@ models:
- name: from_subsidiary_id
description: The subsidiary id which the consolidated exchange rate is from.
- name: to_currency_id
description: The subsidiary id which the consolidated exchange rate is for.
description: The currency id which the consolidated exchange rate is for.
- name: to_subsidiary_id
description: The subsidiary id which the consolidated exchange rate is for.
- name: current_rate
description: The current rate associated with the exchange rate.
- name: average_rate
description: The consolidated exchange rates average rate.
- name: accounting_book_id
description: "{{ doc('accounting_book_id') }}"
- name: historical_rate
description: The historical rate of the exchange rate.

Expand Down Expand Up @@ -498,7 +500,7 @@ models:
- name: net_amount
description: The net amount of the transaction line.
- name: accounting_book_id
description: Reference to the accounting book of the entry.
description: "{{ doc('accounting_book_id') }}"
- name: account_id
description: Reference to the account associated with the entry.
- name: is_posting
Expand Down

0 comments on commit 8255c87

Please sign in to comment.