-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release v0.15.0: Bug fixes for account numbers, addition of commonly …
…used fields and foreign keys (#144) Release v0.15.0 * Fix account_number, add common fields, and subsidiaries_pass_through_columns (#136) * Fix account_number for system generated accounts. * Add subsidiaries pass through columns * Add additional fields * Fix is_account_intercompany on balance_sheet * Fix account_number * Customer PR adding locations fields (#146) --------- Co-authored-by: Avinash Kunnath <108772760+fivetran-avinash@users.noreply.github.com> Co-authored-by: Jared Monger <95247581+jmongerlyra@users.noreply.github.com> Co-authored-by: Antonio Ruby Barreto <antonio.ruby.barreto@fastnedcharging.com>
- Loading branch information
1 parent
0300d33
commit 72f3fcf
Showing
20 changed files
with
379 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
47 changes: 47 additions & 0 deletions
47
integration_tests/tests/consistency/consistency_balance_sheet_amounts.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
case when account_id is null then -999999 else account_id end as account_id, | ||
date_trunc(accounting_period_ending, month) as prod_account_period_month, | ||
count(*) as prod_row_count, | ||
sum(converted_amount) as prod_converted_amount | ||
from {{ target.schema }}_netsuite_prod.netsuite2__balance_sheet | ||
where date_trunc(accounting_period_ending, month) < date_trunc(current_date(), month) - 1 | ||
group by 1, 2 | ||
), | ||
|
||
dev as ( | ||
select | ||
case when account_id is null then -999999 else account_id end as account_id, | ||
date_trunc(accounting_period_ending, month) as dev_account_period_month, | ||
count(*) as dev_row_count, | ||
sum(converted_amount) as dev_converted_amount | ||
from {{ target.schema }}_netsuite_dev.netsuite2__balance_sheet | ||
where date_trunc(accounting_period_ending, month) < date_trunc(current_date(), month) - 1 | ||
group by 1, 2 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.account_id, | ||
prod.prod_account_period_month, | ||
dev.dev_account_period_month, | ||
prod.prod_row_count, | ||
dev.dev_row_count, | ||
prod.prod_converted_amount, | ||
dev.dev_converted_amount | ||
from prod | ||
full outer join dev | ||
on dev.account_id = prod.account_id | ||
and dev.dev_account_period_month = prod.prod_account_period_month | ||
) | ||
|
||
|
||
select * | ||
from final | ||
where abs(prod_converted_amount - dev_converted_amount) >= 0.01 | ||
or abs(prod_row_count - dev_row_count) >= 0.01 |
33 changes: 33 additions & 0 deletions
33
integration_tests/tests/consistency/consistency_balance_sheet_count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_balance_sheet_prod_rows | ||
from {{ target.schema }}_netsuite_prod.netsuite2__balance_sheet | ||
group by 1 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_balance_sheet_dev_rows | ||
from {{ target.schema }}_netsuite_dev.netsuite2__balance_sheet | ||
group by 1 | ||
), | ||
|
||
final as ( | ||
select | ||
total_balance_sheet_prod_rows, | ||
total_balance_sheet_dev_rows | ||
from prod | ||
full outer join dev | ||
on dev.join_key = prod.join_key | ||
) | ||
|
||
select * | ||
from final | ||
where total_balance_sheet_prod_rows != total_balance_sheet_dev_rows |
File renamed without changes.
37 changes: 37 additions & 0 deletions
37
integration_tests/tests/consistency/consistency_income_statement_amounts.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
accounting_period_id, | ||
sum(converted_amount) as prod_converted_amount | ||
from {{ target.schema }}_netsuite_prod.netsuite2__income_statement | ||
where cast(accounting_period_ending as date) < current_date - 1 | ||
group by 1 | ||
), | ||
|
||
dev as ( | ||
select | ||
accounting_period_id, | ||
sum(converted_amount) as dev_converted_amount | ||
from {{ target.schema }}_netsuite_dev.netsuite2__income_statement | ||
where cast(accounting_period_ending as date) < current_date - 1 | ||
group by 1 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.accounting_period_id, | ||
prod.prod_converted_amount, | ||
dev.dev_converted_amount | ||
from prod | ||
full outer join dev | ||
on dev.accounting_period_id = prod.accounting_period_id | ||
) | ||
|
||
|
||
select * | ||
from final | ||
where abs(prod_converted_amount - dev_converted_amount) >= 0.01 |
33 changes: 33 additions & 0 deletions
33
integration_tests/tests/consistency/consistency_income_statement_count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_income_statement_prod_rows | ||
from {{ target.schema }}_netsuite_prod.netsuite2__income_statement | ||
group by 1 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_income_statement_dev_rows | ||
from {{ target.schema }}_netsuite_dev.netsuite2__income_statement | ||
group by 1 | ||
), | ||
|
||
final as ( | ||
select | ||
total_income_statement_prod_rows, | ||
total_income_statement_dev_rows | ||
from prod | ||
full outer join dev | ||
on dev.join_key = prod.join_key | ||
) | ||
|
||
select * | ||
from final | ||
where total_income_statement_prod_rows != total_income_statement_dev_rows |
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
integration_tests/tests/consistency/consistency_transaction_details_count.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_transaction_detail_prod_rows | ||
from {{ target.schema }}_netsuite_prod.netsuite2__transaction_details | ||
group by 1 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
count(*) as total_transaction_detail_dev_rows | ||
from {{ target.schema }}_netsuite_dev.netsuite2__transaction_details | ||
group by 1 | ||
), | ||
|
||
final as ( | ||
select | ||
total_transaction_detail_prod_rows, | ||
total_transaction_detail_dev_rows | ||
from prod | ||
full outer join dev | ||
on dev.join_key = prod.join_key | ||
) | ||
|
||
select * | ||
from final | ||
where total_transaction_detail_prod_rows != total_transaction_detail_dev_rows |
Oops, something went wrong.