Skip to content

Commit

Permalink
feature/subsidiary-currency
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-catfritz committed Oct 27, 2023
1 parent 45aa341 commit 1434ba2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# dbt_netsuite_source v0.9.0
[PR #40](https://github.com/fivetran/dbt_netsuite_source/pull/40) includes the following update:
## 🚨 Breaking Changes 🚨:
- Addition of the `currency` field within the `stg_netsuite2__subsidiaries` model.
- This addition likely won't be breaking for a large number of users. However, if you are leveraging the `subsidiaries_pass_through_columns` variable and have included `currency` as a pass through column, you will experience a duplicate column error. We advise you remove the `currency` field as a pass through columns to avoid runtime errors following this upgrade.

## Contributors:
- [@jmongerlyra](https://github.com/jmongerlyra) ([PR #40](https://github.com/fivetran/dbt_netsuite_source/pull/40))

# dbt_netsuite_source v0.8.0
## 🚨 Breaking Changes 🚨:
- Addition of the `is_eliminate` and `special_account_type_id` fields within the `stg_netsuite2__accounts` model. ([PR #39](https://github.com/fivetran/dbt_netsuite_source/pull/39) and [PR #40](https://github.com/fivetran/dbt_netsuite_source/pull/40))
Expand Down
3 changes: 2 additions & 1 deletion macros/get_subsidiaries_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
{"name": "country", "datatype": dbt.type_string()},
{"name": "state", "datatype": dbt.type_string()},
{"name": "fiscalcalendar", "datatype": dbt.type_int()},
{"name": "parent", "datatype": dbt.type_int()}
{"name": "parent", "datatype": dbt.type_int()},
{"name": "currency", "datatype": dbt.type_int()}
] %}

{{ fivetran_utils.add_pass_through_columns(columns, var('subsidiaries_pass_through_columns')) }}
Expand Down
2 changes: 2 additions & 0 deletions models/netsuite2/src_netsuite2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ sources:
description: "{{ doc('fiscal_calendar_id') }}"
- name: parent
description: Reference to the parent subsidiary.
- name: currency
description: "{{ doc('currency_id') }}"

- name: transaction_accounting_line
identifier: "{{ var('netsuite2_transaction_accounting_line_identifier', 'transactionaccountingline') }}"
Expand Down
3 changes: 2 additions & 1 deletion models/netsuite2/stg_netsuite2__subsidiaries.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ final as (
country,
state,
fiscalcalendar as fiscal_calendar_id,
parent as parent_id
parent as parent_id,
currency as currency_id

--The below macro adds the fields defined within your subsidiaries_pass_through_columns variable into the staging model
{{ fivetran_utils.fill_pass_through_columns('subsidiaries_pass_through_columns') }}
Expand Down
2 changes: 2 additions & 0 deletions models/stg_netsuite2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,8 @@ models:
description: "{{ doc('fiscal_calendar_id') }}"
- name: parent_id
description: Reference to the parent subsidiary.
- name: currency_id
description: "{{ doc('currency_id') }}"

- name: stg_netsuite2__transaction_accounting_lines
description: "{{ doc('transaction_accounting_lines_table') }}"
Expand Down

0 comments on commit 1434ba2

Please sign in to comment.