-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bug/renamed-columns * regen docs * update comments * Update CHANGELOG.md Co-authored-by: Avinash Kunnath <[email protected]> * update changelog and bump packages --------- Co-authored-by: Avinash Kunnath <[email protected]>
- Loading branch information
1 parent
614880a
commit e945a33
Showing
11 changed files
with
112 additions
and
51 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.
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
60 changes: 60 additions & 0 deletions
60
integration_tests/tests/consistency/consistency_columns.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,60 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
/* This test is to make sure the final columns produced are the same between versions. | ||
Only one test is needed since it will fetch all tables and all columns in each schema. | ||
!!! THIS TEST IS WRITTEN FOR BIGQUERY!!! */ | ||
{% if target.type == 'bigquery' %} | ||
with prod as ( | ||
select | ||
table_name, | ||
column_name, | ||
data_type | ||
from {{ target.schema }}_salesforce_prod.INFORMATION_SCHEMA.COLUMNS | ||
), | ||
|
||
dev as ( | ||
select | ||
table_name, | ||
column_name, | ||
data_type | ||
from {{ target.schema }}_salesforce_dev.INFORMATION_SCHEMA.COLUMNS | ||
), | ||
|
||
prod_not_in_dev as ( | ||
-- rows from prod not found in dev | ||
select * from prod | ||
except distinct | ||
select * from dev | ||
), | ||
|
||
dev_not_in_prod as ( | ||
-- rows from dev not found in prod | ||
select * from dev | ||
except distinct | ||
select * from prod | ||
), | ||
|
||
final as ( | ||
select | ||
*, | ||
'from prod' as source | ||
from prod_not_in_dev | ||
|
||
union all -- union since we only care if rows are produced | ||
|
||
select | ||
*, | ||
'from dev' as source | ||
from dev_not_in_prod | ||
) | ||
|
||
select * | ||
from final | ||
|
||
{% else %} | ||
{{ print('This is written to run on bigquery. If you need to run on another warehouse, add another version for that warehouse') }} | ||
|
||
{% endif %} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
packages: | ||
- package: fivetran/salesforce_source | ||
version: [">=1.0.0", "<1.1.0"] | ||
version: [">=1.1.0", "<1.2.0"] |