-
Notifications
You must be signed in to change notification settings - Fork 3
feature/union-data #41
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
Changes from 8 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
bcf0416
feature/union-data
fivetran-savage 1446ef2
update_formatting
fivetran-savage 9330632
Update formatting in dbt_project.yml
fivetran-savage 9c06ed5
revert_date_spine_reference
fivetran-savage 8318295
Generate dbt docs via GitHub Actions
github-actions[bot] 32d4f79
Apply suggestions from code review
fivetran-savage 15c799a
add_partition_by_config
fivetran-savage db98fb1
Apply suggestions from code review
fivetran-savage 61e2452
Apply suggestions from code review
fivetran-savage 78d7fba
Update integration_tests/tests/consistency/consistency_customer_detai…
fivetran-savage acc53e4
Update date calculation logic in SQL file
fivetran-catfritz 1cbd321
fix it
fivetran-catfritz b5bdcc2
fix
fivetran-catfritz 8a1934e
fix staging
fivetran-catfritz dbe62e7
Update models/intermediate/int_recharge__calendar_spine.sql
fivetran-catfritz 66f87c8
fix conditionals
fivetran-catfritz 016ba42
Merge branch 'fivetran-catfritz-patch-1' of https://github.com/fivetr…
fivetran-catfritz 2ae907b
Update int_recharge__calendar_spine.sql
fivetran-catfritz 80298e3
Enhance SQL with comment for date calculation
fivetran-catfritz 52ea1ea
Add comment for year range in SQL query
fivetran-catfritz 0d7d1de
Cast first_date and last_date to string
fivetran-catfritz f2eb150
Merge pull request #42 from fivetran/fivetran-catfritz-patch-1
fivetran-savage cec4f46
update_changelog
fivetran-savage a59d45e
Generate dbt docs via GitHub Actions
github-actions[bot] 5b95690
Update CHANGELOG
fivetran-savage 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -71,3 +71,6 @@ env/ | |
| env.bak/ | ||
| venv/ | ||
| venv.bak/ | ||
|
|
||
| # Claude instructions | ||
| union_data_agents.md | ||
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,6 +1,6 @@ | ||
|
|
||
| name: 'recharge' | ||
| version: '1.1.0' | ||
| version: '1.2.0' | ||
| config-version: 2 | ||
| require-dbt-version: [">=1.3.0", "<2.0.0"] | ||
|
|
||
|
|
||
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 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
48 changes: 48 additions & 0 deletions
48
integration_tests/tests/consistency/consistency_customer_daily_rollup.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,48 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| {% set exclude_cols = var('consistency_test_exclude_metrics', []) %} | ||
|
|
||
| -- this test ensures the recharge__customer_daily_rollup end model matches the prior version | ||
| with prod as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__customer_daily_rollup'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_prod.recharge__customer_daily_rollup | ||
| ), | ||
|
|
||
| dev as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__customer_daily_rollup'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_dev.recharge__customer_daily_rollup | ||
| ), | ||
|
|
||
| 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 |
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
48 changes: 48 additions & 0 deletions
48
integration_tests/tests/consistency/consistency_line_item_enhanced.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,48 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| {% set exclude_cols = var('consistency_test_exclude_metrics', []) %} | ||
|
|
||
| -- this test ensures the recharge__line_item_enhanced end model matches the prior version | ||
| with prod as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__line_item_enhanced'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_prod.recharge__line_item_enhanced | ||
| ), | ||
|
|
||
| dev as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__line_item_enhanced'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_dev.recharge__line_item_enhanced | ||
| ), | ||
|
|
||
| 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 |
48 changes: 48 additions & 0 deletions
48
integration_tests/tests/consistency/consistency_monthly_recurring_revenue.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,48 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| {% set exclude_cols = var('consistency_test_exclude_metrics', []) %} | ||
|
|
||
| -- this test ensures the recharge__monthly_recurring_revenue end model matches the prior version | ||
| with prod as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__monthly_recurring_revenue'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_prod.recharge__monthly_recurring_revenue | ||
| ), | ||
|
|
||
| dev as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__monthly_recurring_revenue'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_dev.recharge__monthly_recurring_revenue | ||
| ), | ||
|
|
||
| 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 |
48 changes: 48 additions & 0 deletions
48
integration_tests/tests/consistency/consistency_subscription_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,48 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| {% set exclude_cols = var('consistency_test_exclude_metrics', []) %} | ||
|
|
||
| -- this test ensures the recharge__subscription_overview end model matches the prior version | ||
| with prod as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__subscription_overview'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_prod.recharge__subscription_overview | ||
| ), | ||
|
|
||
| dev as ( | ||
| select {{ dbt_utils.star(from=ref('recharge__subscription_overview'), except=exclude_cols) }} | ||
| from {{ target.schema }}_recharge_dev.recharge__subscription_overview | ||
| ), | ||
|
|
||
| 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.
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.