-
Notifications
You must be signed in to change notification settings - Fork 1
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
Feature/cdm line item #12
Closed
+524
−38
Closed
Changes from 17 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
72df086
feature/cdm-line-item
fivetran-catfritz 70255d3
move folder
fivetran-catfritz f5af97b
gitadd
fivetran-catfritz 3693a6b
fix concat
fivetran-catfritz dbb4121
fixes
fivetran-catfritz bc2f936
fixes
fivetran-catfritz c997830
fixes
fivetran-catfritz c3c2502
feature/cdm-line-item
fivetran-catfritz a60c238
feature/cdm-line-item
fivetran-catfritz 97a4f44
feature/cdm-line-item
fivetran-catfritz a139c7c
remove unneeded cols
fivetran-catfritz cb9b531
revisions on included fields
fivetran-catfritz b904bda
update tests and joins
fivetran-catfritz 52d5b4e
adjust descriptions
fivetran-catfritz 741435a
adjust descriptions
fivetran-catfritz 9c7da02
add tests
fivetran-catfritz 0e36636
adjust sort
fivetran-catfritz 3b7f029
doc and casting updates
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 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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: 'auto release' | ||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-workflow-passing-data: | ||
if: github.event.pull_request.merged | ||
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main | ||
secrets: inherit |
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,5 +1,5 @@ | ||
name: 'zuora' | ||
version: '0.2.1' | ||
version: '0.3.0' | ||
config-version: 2 | ||
require-dbt-version: [">=1.3.0", "<2.0.0"] | ||
|
||
|
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,4 +1,5 @@ | ||
target/ | ||
dbt_modules/ | ||
logs/ | ||
env/ | ||
env/ | ||
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,2 +1,2 @@ | ||
packages: | ||
- local: ../ | ||
- local: ../ |
31 changes: 31 additions & 0 deletions
31
integration_tests/tests/consistency/consistency_line_item_enhanced.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,31 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select * | ||
from {{ target.schema }}_zuora_prod.zuora__line_item_enhanced | ||
), | ||
|
||
dev as ( | ||
select * | ||
from {{ target.schema }}_zuora_dev.zuora__line_item_enhanced | ||
), | ||
|
||
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_line_item_enhanced_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 }}_zuora_prod.zuora__line_item_enhanced | ||
), | ||
|
||
dev as ( | ||
select count(*) as dev_rows | ||
from {{ target.schema }}_zuora_dev.zuora__line_item_enhanced | ||
) | ||
|
||
-- 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 |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reminder to update docs. |
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,135 @@ | ||
{% docs billing_type %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs created_at %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs currency %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_city %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_company %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_country %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_email %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_level %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs customer_name %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs discount_amount %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs header_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs header_status %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs line_item_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs line_item_index %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs payment_at %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs payment_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs payment_method %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs payment_method_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs product_category %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs product_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs product_name %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs product_type %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs quantity %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs record_type %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs refund_amount %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs subscription_id %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs subscription_period_ended_at %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs subscription_period_started_at %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs subscription_status %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs tax_amount %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs total_amount %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs transaction_type %} | ||
description | ||
{% enddocs %} | ||
|
||
{% docs unit_amount %} | ||
description | ||
{% enddocs %} |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a really neat approach for this validation!