-
Notifications
You must be signed in to change notification settings - Fork 37
Release/v0.13.0 #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Release/v0.13.0 #78
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
a9fdc53
datespine updates
fivetran-catfritz 76d48ce
add tests
fivetran-catfritz 4392a11
update databricks int test config
fivetran-catfritz 63f3d1b
update reqs
fivetran-catfritz 9b23d08
add tests and revise changelog
fivetran-catfritz 7a92f09
update yml
fivetran-catfritz 4328e8b
undo changes to account_daily
fivetran-catfritz 1570669
remove extra comments
fivetran-catfritz c48cb78
update test
fivetran-catfritz a215e15
Update integration_tests/dbt_project.yml
fivetran-catfritz 7f6951d
update readme
fivetran-catfritz 7c6161c
regen docs
fivetran-catfritz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 | ||
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains hidden or 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 hidden or 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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.