Skip to content

Commit

Permalink
Merge pull request #35 from fivetran/customer/norina-sun
Browse files Browse the repository at this point in the history
Customer/norina sun
  • Loading branch information
fivetran-joemarkiewicz authored Sep 17, 2021
2 parents 4cdb78f + c147a35 commit 5e3ceb5
Show file tree
Hide file tree
Showing 10 changed files with 43 additions and 18 deletions.
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'netsuite'
version: '0.4.0'
version: '0.4.1'
profile: 'integration'
require-dbt-version: [">=0.20.0"]
models:
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

24 changes: 12 additions & 12 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.

1 change: 0 additions & 1 deletion docs/run_results.json

This file was deleted.

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: 'netsuite_integration_tests'
version: '0.4.0'
version: '0.4.1'
profile: 'integration_tests'
config-version: 2

Expand Down
10 changes: 10 additions & 0 deletions models/netsuite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ models:
description: Category of the account. Options include Asset, Liability, Equity, Expense or Income.
- name: income_statement_sort_helper
description: Helper column for sorting income statement records.
- name: subsidiary_id
description: The unique identifier of the subsidiary.
- name: subsidiary_full_name
description: The full name of the subsidiary.
- name: subsidiary_name
description: Name of the subsidiary.

- name: netsuite__transaction_details
description: >
Expand Down Expand Up @@ -186,6 +192,10 @@ models:
description: Country where the customer is located.
- name: customer_date_first_order
description: Date customer placed first order.
- name: customer_external_id
description: The unique identifier of the external customer reference.
- name: class_full_name
description: Full name of the class.
- name: item_name
description: Name of the item.
- name: item_type_name
Expand Down
6 changes: 6 additions & 0 deletions models/netsuite__income_statement.sql
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ income_statement as (
accounts.type_name as account_type_name,
accounts.account_id as account_id,
accounts.account_number,
subsidiaries.subsidiary_id,
subsidiaries.full_name as subsidiary_full_name,
subsidiaries.name as subsidiary_name,

--The below script allows for accounts table pass through columns.
{% if var('accounts_pass_through_columns') %}
Expand Down Expand Up @@ -122,6 +125,9 @@ income_statement as (

join accounting_periods as reporting_accounting_periods
on reporting_accounting_periods.accounting_period_id = transactions_with_converted_amounts.reporting_accounting_period_id

join subsidiaries
on transactions_with_converted_amounts.subsidiary_id = subsidiaries.subsidiary_id

--Below is only used if income statement transaction detail columns are specified dbt_project.yml file.
{% if var('income_statement_transaction_detail_columns') != []%}
Expand Down
10 changes: 10 additions & 0 deletions models/netsuite__transaction_details.sql
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ currencies as (
from {{ var('currencies') }}
),

classes as (
select *
from {{ var('classes') }}
),

transaction_details as (
select
transaction_lines.transaction_line_id,
Expand Down Expand Up @@ -129,6 +134,8 @@ transaction_details as (
customers.zipcode as customer_zipcode,
customers.country as customer_country,
customers.date_first_order_at as customer_date_first_order,
customers.customer_external_id,
classes.full_name as class_full_name,
items.name as item_name,
items.type_name as item_type_name,
items.sales_description,
Expand Down Expand Up @@ -184,6 +191,9 @@ transaction_details as (

left join customers
on customers.customer_id = transaction_lines.company_id

left join classes
on classes.class_id = transaction_lines.class_id

left join items
on items.item_id = transaction_lines.item_id
Expand Down
2 changes: 1 addition & 1 deletion packages.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
packages:
- package: fivetran/netsuite_source
version: [">=0.3.0", "<0.4.0"]
version: [">=0.3.0", "<0.4.0"]

0 comments on commit 5e3ceb5

Please sign in to comment.