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/subsidiary currency #42

Merged
merged 17 commits into from
Dec 14, 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
44 changes: 9 additions & 35 deletions .github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,22 @@
**This PR will result in the following new package version:**
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->

**Please detail what change(s) this PR introduces and any additional information that should be known during the review of this PR:**
**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
<!--- Copy/paste the CHANGELOG for this version below. -->

## PR Checklist
### Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
- [ ] dbt compile
- [ ] dbt run –full-refresh
- [ ] dbt run
- [ ] dbt test
- [ ] dbt run –vars (if applicable)
- [ ] dbt run –full-refresh && dbt test
- [ ] dbt run (if incremental models are present)

Before marking this PR as "ready for review" the following have been applied:
- [ ] The appropriate issue has been linked and tagged
- [ ] You are assigned to the corresponding issue and this PR
- [ ] The appropriate issue has been linked, tagged, and properly assigned
- [ ] All necessary documentation and version upgrades have been applied
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
- [ ] BuildKite integration tests are passing
- [ ] Detailed validation steps have been provided below

### Detailed Validation
Please acknowledge that the following validation checks have been performed prior to marking this PR as "ready for review":
- [ ] You have validated these changes and assure this PR will address the respective Issue/Feature.
- [ ] You are reasonably confident these changes will not impact any other components of this package or any dependent packages.
- [ ] You have provided details below around the validation steps performed to gain confidence in these changes.
Please share any and all of your validation steps:
<!--- Provide the steps you took to validate your changes below. -->

### Standard Updates
Please acknowledge that your PR contains the following standard updates:
- Package versioning has been appropriately indexed in the following locations:
- [ ] indexed within dbt_project.yml
- [ ] indexed within integration_tests/dbt_project.yml
- [ ] CHANGELOG has individual entries for each respective change in this PR
<!--- If there is a parallel upstream change, remember to reference the corresponding CHANGELOG as an individual entry. -->
- [ ] README updates have been applied (if applicable)
<!--- Remember to check the following README locations for common updates. →
<!--- Suggested install range (needed for breaking changes) →
<!--- Dependency matrix is appropriately updated (if applicable) →
<!--- New variable documentation (if applicable) -->
- [ ] DECISIONLOG updates have been updated (if applicable)
- [ ] Appropriate yml documentation has been added (if applicable)

### dbt Docs
Please acknowledge that after the above were all completed the below were applied to your branch:
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)

### If you had to summarize this PR in an emoji, which would it be?
<!--- For a complete list of markdown compatible emojis check our this git repo (https://gist.github.com/rxaviers/7360908) -->
:dancer:
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 #42](https://github.com/fivetran/dbt_netsuite_source/pull/42) includes the following update:
## 🚨 Breaking Changes 🚨:
- Addition of the `currency` field as `currency_id` 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 column to avoid runtime errors following this upgrade.

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

# 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
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.8.0", "<0.9.0"]
version: [">=0.9.0", "<0.10.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.8.0'
version: '0.9.0'

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

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,6 +1,6 @@
name: 'netsuite_source_integration_tests'

version: '0.8.0'
version: '0.9.0'

profile: 'integration_tests'
config-version: 2
Expand Down
4 changes: 1 addition & 3 deletions integration_tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ dbt-redshift>=1.3.0,<2.0.0
dbt-postgres>=1.3.0,<2.0.0
dbt-spark>=1.3.0,<2.0.0
dbt-spark[PyHive]>=1.3.0,<2.0.0
dbt-databricks>=1.3.0,<2.0.0

oscrypto @ git+https://github.com/wbond/oscrypto.git@d5f3437
dbt-databricks>=1.6.0,<2.0.0
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
3 changes: 3 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 All @@ -490,6 +492,7 @@ models:
combination_of_columns:
- transaction_id
- transaction_line_id
- accounting_book_id
columns:
- name: transaction_id
description: The tra "{{ doc('transaction_id') }}"nsaction id which the transaction line is associated with.
Expand Down