Skip to content

Commit

Permalink
Final PR changes
Browse files Browse the repository at this point in the history
  • Loading branch information
fivetran-avinash committed Nov 13, 2024
1 parent 57118b8 commit bdb3da0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 1 deletion.
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.14.0'
version: '0.15.0'
profile: 'integration_tests'
config-version: 2

Expand Down
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

0 comments on commit bdb3da0

Please sign in to comment.