-
Notifications
You must be signed in to change notification settings - Fork 1
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 #10 from fivetran/feature/add_display_values
Updates to display names
- Loading branch information
Showing
38 changed files
with
1,297 additions
and
290 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
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
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
84 changes: 84 additions & 0 deletions
84
integration_tests/tests/consistency/activity_enhanced_aggs.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,84 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
task_updated_date, | ||
source_relation, | ||
sum(total_active_tasks) as total_active_tasks, | ||
sum(total_active_problem_tasks) as total_active_problem_tasks, | ||
sum(total_active_change_tasks) as total_active_change_tasks, | ||
sum(total_associated_problems) as total_associated_problems, | ||
sum(total_incidents_caused_by_problems) as total_incidents_caused_by_problems, | ||
sum(total_change_requests) as total_change_requests, | ||
sum(total_closed_tasks) as total_closed_tasks, | ||
sum(average_minutes_open_to_close) as average_minutes_open_to_close, | ||
sum(total_tasks_made_slas) as total_tasks_made_slas | ||
|
||
from {{ target.schema }}_servicenow_prod.servicenow__activity_summary | ||
group by 1,2 | ||
), | ||
|
||
dev as ( | ||
select | ||
task_updated_date, | ||
source_relation, | ||
sum(total_active_tasks) as total_active_tasks, | ||
sum(total_active_problem_tasks) as total_active_problem_tasks, | ||
sum(total_active_change_tasks) as total_active_change_tasks, | ||
sum(total_associated_problems) as total_associated_problems, | ||
sum(total_incidents_caused_by_problems) as total_incidents_caused_by_problems, | ||
sum(total_change_requests) as total_change_requests, | ||
sum(total_closed_tasks) as total_closed_tasks, | ||
sum(average_minutes_open_to_close) as average_minutes_open_to_close, | ||
sum(total_tasks_made_slas) as total_tasks_made_slas | ||
|
||
from {{ target.schema }}_servicenow_dev.servicenow__activity_summary | ||
group by 1,2 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.task_updated_date as prod_task_updated_date, | ||
dev.task_updated_date as dev_task_updated_date, | ||
prod.source_relation as prod_source_relation, | ||
dev.source_relation as dev_source_relation, | ||
prod.total_active_tasks as prod_total_active_tasks, | ||
dev.total_active_tasks as dev_total_active_tasks, | ||
prod.total_active_problem_tasks as prod_total_active_problem_tasks, | ||
dev.total_active_problem_tasks as dev_total_active_problem_tasks, | ||
prod.total_active_change_tasks as prod_total_active_change_tasks, | ||
dev.total_active_change_tasks as dev_total_active_change_tasks, | ||
prod.total_associated_problems as prod_total_associated_problems, | ||
dev.total_associated_problems as dev_total_associated_problems, | ||
prod.total_incidents_caused_by_problems as prod_total_incidents_caused_by_problems, | ||
dev.total_incidents_caused_by_problems as dev_total_incidents_caused_by_problems, | ||
prod.total_change_requests as prod_total_change_requests, | ||
dev.total_change_requests as dev_total_change_requests, | ||
prod.total_closed_tasks as prod_total_closed_tasks, | ||
dev.total_closed_tasks as dev_total_closed_tasks, | ||
prod.average_minutes_open_to_close as prod_average_minutes_open_to_close, | ||
dev.average_minutes_open_to_close as dev_average_minutes_open_to_close, | ||
prod.total_tasks_made_slas as prod_total_tasks_made_slas, | ||
dev.total_tasks_made_slas as dev_total_tasks_made_slas | ||
|
||
from prod | ||
full outer join dev | ||
on prod.task_updated_date = dev.task_updated_date | ||
and prod.source_relation = dev.source_relation | ||
) | ||
|
||
select * | ||
from final | ||
where | ||
abs(prod_total_active_tasks - dev_total_active_tasks) > .1 or | ||
abs(prod_total_active_problem_tasks - dev_total_active_problem_tasks) > .1 or | ||
abs(prod_total_active_change_tasks - dev_total_active_change_tasks) > .1 or | ||
abs(prod_total_associated_problems - dev_total_associated_problems) > .1 or | ||
abs(prod_total_incidents_caused_by_problems - dev_total_incidents_caused_by_problems) > .1 or | ||
abs(prod_total_change_requests - dev_total_change_requests) > .1 or | ||
abs(prod_total_closed_tasks - dev_total_closed_tasks) > .1 or | ||
abs(prod_average_minutes_open_to_close - dev_average_minutes_open_to_close) > .1 or | ||
abs(prod_total_tasks_made_slas - dev_total_tasks_made_slas) > .1 |
38 changes: 38 additions & 0 deletions
38
integration_tests/tests/consistency/change_request_enhanced_row_counts.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,38 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
from {{ target.schema }}_servicenow_prod.servicenow__change_request_enhanced | ||
group by 1,2 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
|
||
from {{ target.schema }}_servicenow_dev.servicenow__change_request_enhanced | ||
group by 1,2 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.row_count as prod_row_count, | ||
dev.row_count as dev_row_count | ||
|
||
from prod | ||
full outer join dev | ||
on prod.join_key = dev.join_key | ||
and prod.source_relation = dev.source_relation | ||
) | ||
|
||
select * | ||
from final | ||
where prod_row_count != dev_row_count |
38 changes: 38 additions & 0 deletions
38
integration_tests/tests/consistency/incident_enhanced_row_counts.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,38 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
from {{ target.schema }}_servicenow_prod.servicenow__incident_enhanced | ||
group by 1,2 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
|
||
from {{ target.schema }}_servicenow_dev.servicenow__incident_enhanced | ||
group by 1,2 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.row_count as prod_row_count, | ||
dev.row_count as dev_row_count | ||
|
||
from prod | ||
full outer join dev | ||
on prod.join_key = dev.join_key | ||
and prod.source_relation = dev.source_relation | ||
) | ||
|
||
select * | ||
from final | ||
where prod_row_count != dev_row_count |
38 changes: 38 additions & 0 deletions
38
integration_tests/tests/consistency/problem_enhanced_row_counts.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,38 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
with prod as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
from {{ target.schema }}_servicenow_prod.servicenow__problem_enhanced | ||
group by 1,2 | ||
), | ||
|
||
dev as ( | ||
select | ||
1 as join_key, | ||
source_relation, | ||
count(*) as row_count | ||
|
||
from {{ target.schema }}_servicenow_dev.servicenow__problem_enhanced | ||
group by 1,2 | ||
), | ||
|
||
final as ( | ||
select | ||
prod.row_count as prod_row_count, | ||
dev.row_count as dev_row_count | ||
|
||
from prod | ||
full outer join dev | ||
on prod.join_key = dev.join_key | ||
and prod.source_relation = dev.source_relation | ||
) | ||
|
||
select * | ||
from final | ||
where prod_row_count != dev_row_count |
Oops, something went wrong.