-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add datatype casting and temp deps (#12)
* add datatype casting and temp deps * run on empty schema * working with limit 1 * stage directory stuff for showing people * workgin * testing * docs * polish * changelog * update source package ref --------- Co-authored-by: Jamie Rodriguez <[email protected]>
- Loading branch information
1 parent
38cff3f
commit 00e3228
Showing
21 changed files
with
714 additions
and
74 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.
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,2 +1,2 @@ | ||
packages: | ||
- local: ../ | ||
- local: ../ |
51 changes: 51 additions & 0 deletions
51
integration_tests/tests/consistency/consistency_qualtrics__contact.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,51 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__contact'), except=["avg_survey_duration_in_seconds"]) }}, | ||
round(avg_survey_duration_in_seconds, 2) as avg_survey_duration_in_seconds | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__contact | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__contact'), except=["avg_survey_duration_in_seconds"]) }}, | ||
round(avg_survey_duration_in_seconds, 2) as avg_survey_duration_in_seconds | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__contact | ||
|
||
), | ||
|
||
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 |
49 changes: 49 additions & 0 deletions
49
integration_tests/tests/consistency/consistency_qualtrics__daily_breakdown.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,49 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__daily_breakdown')) }} | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__daily_breakdown | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__daily_breakdown')) }} | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__daily_breakdown | ||
|
||
), | ||
|
||
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 |
49 changes: 49 additions & 0 deletions
49
integration_tests/tests/consistency/consistency_qualtrics__directory.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,49 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__directory')) }} | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__directory | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__directory')) }} | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__directory | ||
|
||
), | ||
|
||
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 |
49 changes: 49 additions & 0 deletions
49
integration_tests/tests/consistency/consistency_qualtrics__distribution.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,49 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__distribution')) }} | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__distribution | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__distribution')) }} | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__distribution | ||
|
||
), | ||
|
||
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 |
49 changes: 49 additions & 0 deletions
49
integration_tests/tests/consistency/consistency_qualtrics__response.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,49 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__response')) }} | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__response | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__response')) }} | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__response | ||
|
||
), | ||
|
||
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 |
53 changes: 53 additions & 0 deletions
53
integration_tests/tests/consistency/consistency_qualtrics__survey.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,53 @@ | ||
|
||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__survey'), except=['avg_response_duration_in_seconds', 'avg_survey_progress_pct']) }}, | ||
round(avg_response_duration_in_seconds, 0) as avg_response_duration_in_seconds, | ||
round(avg_survey_progress_pct, 0) as avg_survey_progress_pct | ||
from {{ target.schema }}_qualtrics_prod.qualtrics__survey | ||
), | ||
|
||
dev as ( | ||
select | ||
{{ dbt_utils.star(from=ref('qualtrics__survey'), except=['avg_response_duration_in_seconds', 'avg_survey_progress_pct']) }}, | ||
round(avg_response_duration_in_seconds, 0) as avg_response_duration_in_seconds, | ||
round(avg_survey_progress_pct, 0) as avg_survey_progress_pct | ||
from {{ target.schema }}_qualtrics_dev.qualtrics__survey | ||
|
||
), | ||
|
||
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 |
Oops, something went wrong.