-
Notifications
You must be signed in to change notification settings - Fork 7
Union capability #52
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
Union capability #52
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
4cbbc36
send to bk
fivetran-jamie 9f1b9c5
dynamic partitions for redshift
fivetran-jamie 5705d8f
consistency
fivetran-jamie 4b7ccc9
docs
fivetran-jamie 1ee9acb
catherine feedback
fivetran-jamie de10ce8
Generate dbt docs via GitHub Actions
github-actions[bot] 4f4e499
catherine feedback
fivetran-jamie eb8c8d4
mixed up order
fivetran-jamie 6d684e7
Generate dbt docs via GitHub Actions
github-actions[bot] 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,5 @@ env/ | |
| env.bak/ | ||
| venv/ | ||
| venv.bak/ | ||
|
|
||
| CLAUDE.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
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
25 changes: 25 additions & 0 deletions
25
integration_tests/tests/consistency/consistency_campaigns_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,25 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) and var('marketo__enable_campaigns', true) | ||
| ) }} | ||
|
|
||
|
|
||
| with prod as ( | ||
| select count(*) as prod_row_count | ||
| from {{ target.schema }}_marketo_prod.marketo__campaigns | ||
| ), | ||
|
|
||
| dev as ( | ||
| select count(*) as dev_row_count | ||
| from {{ target.schema }}_marketo_dev.marketo__campaigns | ||
| ), | ||
|
|
||
| count_check as ( | ||
| select * | ||
| from prod | ||
| join dev | ||
| on prod.prod_row_count != dev.dev_row_count | ||
| ) | ||
|
|
||
| select * | ||
| from count_check |
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
46 changes: 46 additions & 0 deletions
46
integration_tests/tests/consistency/consistency_lead_history.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,46 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| -- this test ensures the marketo__lead_history end model matches the prior version | ||
| with prod as ( | ||
| select {{ dbt_utils.star(from=ref('marketo__lead_history'), except=var('consistency_test_exclude_columns', [])) }} | ||
| from {{ target.schema }}_marketo_prod.marketo__lead_history | ||
| ), | ||
|
|
||
| dev as ( | ||
| select {{ dbt_utils.star(from=ref('marketo__lead_history'), except=var('consistency_test_exclude_columns', [])) }} | ||
| from {{ target.schema }}_marketo_dev.marketo__lead_history | ||
| ), | ||
|
|
||
| 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
24 changes: 24 additions & 0 deletions
24
integration_tests/tests/consistency/consistency_leads_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,24 @@ | ||
| {{ config( | ||
| tags="fivetran_validations", | ||
| enabled=var('fivetran_validation_tests_enabled', false) | ||
| ) }} | ||
|
|
||
| with prod as ( | ||
| select count(*) as prod_row_count | ||
| from {{ target.schema }}_marketo_prod.marketo__leads | ||
| ), | ||
|
|
||
| dev as ( | ||
| select count(*) as dev_row_count | ||
| from {{ target.schema }}_marketo_dev.marketo__leads | ||
| ), | ||
|
|
||
| count_check as ( | ||
| select * | ||
| from prod | ||
| join dev | ||
| on prod.prod_row_count != dev.dev_row_count | ||
| ) | ||
|
|
||
| select * | ||
| from count_check |
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.