-
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.
Merge pull request #78 from fivetran/release/v0.13.0
Release/v0.13.0
- Loading branch information
Showing
22 changed files
with
143 additions
and
61 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ target/ | |
dbt_modules/ | ||
logs/ | ||
env/ | ||
dbt_packages/ | ||
dbt_packages/ | ||
package-lock.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
target/ | ||
dbt_modules/ | ||
logs/ | ||
.DS_Store | ||
.DS_Store | ||
package-lock.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
dbt-snowflake>=1.3.0,<2.0.0 | ||
dbt-bigquery>=1.3.0,<2.0.0 | ||
dbt-redshift>=1.3.0,<2.0.0 | ||
dbt-postgres>=1.3.0,<2.0.0 | ||
dbt-spark>=1.3.0,<2.0.0 | ||
dbt-spark[PyHive]>=1.3.0,<2.0.0 | ||
dbt-databricks>=1.3.0,<2.0.0 | ||
|
||
oscrypto @ git+https://github.com/wbond/oscrypto.git@d5f3437 | ||
dbt-snowflake>=1.3.0,<1.8.0 | ||
dbt-bigquery>=1.3.0,<1.8.0 | ||
dbt-redshift>=1.3.0,<1.8.0 | ||
dbt-postgres>=1.3.0,<1.8.0 | ||
dbt-spark>=1.3.0,<1.8.0 | ||
dbt-spark[PyHive]>=1.3.0,<1.8.0 | ||
dbt-databricks>=1.3.0,<1.8.0 |
39 changes: 39 additions & 0 deletions
39
integration_tests/tests/consistency/consistency_daily_overview.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,39 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
-- this test ensures the daily_overview end model matches the prior version | ||
-- and is aggregated on the date_index grain since the rollings totals will cause variation at the account_id grain | ||
-- the below iterates through the prod and dev names to reduce redudancy of logic | ||
with | ||
{% for prod_or_dev in ('prod', 'dev') %} | ||
{% set cols = adapter.get_columns_in_relation(ref('stripe__daily_overview')) %} | ||
{{ prod_or_dev }} as ( | ||
select | ||
date_index, | ||
source_relation | ||
{% for col in cols if col.name not in ["account_id", "account_daily_id", "date_day", "date_week", "date_month", "date_year", "date_index", "source_relation"] %} | ||
, floor(sum({{ col.name }})) as summed_{{ col.name }} -- floor and sum is to keep consistency between dev and prod aggs | ||
{% endfor %} | ||
from {{ target.schema }}_stripe_{{ prod_or_dev }}.stripe__daily_overview | ||
group by 1,2 -- need to group to remove randomization stemming from rolling totals | ||
), | ||
{% endfor %} | ||
|
||
final as ( | ||
-- test will fail if any rows from prod are not found in dev | ||
(select * from prod | ||
except distinct | ||
select * from dev) | ||
|
||
union all -- union since we only care if rows are produced | ||
|
||
-- test will fail if any rows from dev are not found in prod | ||
(select * from dev | ||
except distinct | ||
select * from prod) | ||
) | ||
|
||
select * | ||
from final |
21 changes: 21 additions & 0 deletions
21
integration_tests/tests/consistency/consistency_daily_overview_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,21 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
-- this test is to make sure the rows counts are the same between versions | ||
with prod as ( | ||
select count(*) as prod_rows | ||
from {{ target.schema }}_stripe_prod.stripe__daily_overview | ||
), | ||
|
||
dev as ( | ||
select count(*) as dev_rows | ||
from {{ target.schema }}_stripe_dev.stripe__daily_overview | ||
) | ||
|
||
-- test will return values and fail if the row counts don't match | ||
select * | ||
from prod | ||
join dev | ||
on prod.prod_rows != dev.dev_rows |
21 changes: 21 additions & 0 deletions
21
integration_tests/tests/integrity/integrity_daily_overview.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,21 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
-- this test is to make sure there is no fanout between the spine and the daily_overview | ||
with spine as ( | ||
select count(*) as spine_count | ||
from {{ target.schema }}_stripe_dev.int_stripe__date_spine | ||
), | ||
|
||
daily_overview as ( | ||
select count(*) as daily_overview_count | ||
from {{ target.schema }}_stripe_dev.stripe__daily_overview | ||
) | ||
|
||
-- test will return values and fail if the row counts don't match | ||
select * | ||
from spine | ||
join daily_overview | ||
on spine.spine_count != daily_overview.daily_overview_count |
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.
File renamed without changes.
File renamed without changes.
File renamed without changes.