-
Notifications
You must be signed in to change notification settings - Fork 30
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
bug/missing-sla-policies #164
Changes from 17 commits
896c033
f3e8958
7c3ec51
455a92e
1eb6861
4f682af
0bf1d07
2768caf
98fd26b
fea4e7e
0eee404
73daccb
7ac92f5
4831ab9
786c56d
a8b4190
2a202af
8a4de12
0c382e5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,3 +1,17 @@ | ||||||
# dbt_zendesk v0.17.0 | ||||||
|
||||||
## Bug Fixes | ||||||
- Fixed an issue in the `zendesk__sla_policies` model where tickets that were opened and solved outside of scheduled hours were not being reported. | ||||||
- Resolved by adjusting the join logic in models `int_zendesk__agent_work_time_business_hours` and `int_zendesk__requester_wait_time_business_hours`. ([#164](https://github.com/fivetran/dbt_zendesk/pull/164), [#156](https://github.com/fivetran/dbt_zendesk/pull/156)) | ||||||
- Fixed as issue in the `zendesk__ticket_metrics` model where certain tickets had miscalculated metrics. | ||||||
- Resolved by adjusting the join logic in models `int_zendesk__ticket_work_time_business`, `int_zendesk__ticket_first_resolution_time_business`, and `int_zendesk__ticket_full_resolution_time_business`. ([#167](https://github.com/fivetran/dbt_zendesk/pull/167)) | ||||||
|
||||||
## Under the hood | ||||||
- Added integrity validations: | ||||||
- Test to ensure `zendesk__sla_policies` and `zendesk__ticket_metrics` models produce consistent time results. ([#164](https://github.com/fivetran/dbt_zendesk/pull/164)) | ||||||
- Test to ensure `zendesk__ticket_metrics` contains all the tickets found in `stg_zendesk__ticket`. | ||||||
- Reduced the weeks looking ahead from 208 to 52 for performance. ([#156](https://github.com/fivetran/dbt_zendesk/pull/156), [#167](https://github.com/fivetran/dbt_zendesk/pull/167)) | ||||||
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. I don't love this suggestion, but want to add a bit more context here as to why we are making this change.
Suggested change
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. How about this? G came up with it of course. 😄 |
||||||
|
||||||
# dbt_zendesk v0.16.0 | ||||||
## 🚨 Minor Upgrade 🚨 | ||||||
Although this update is not a breaking change, it will likely impact the output of the `zendesk__sla_policies` and `zendesk__sla_metrics` models. [PR #154](https://github.com/fivetran/dbt_zendesk/pull/154) includes the following changes: | ||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
name: 'zendesk' | ||
version: '0.16.0' | ||
version: '0.17.0' | ||
|
||
|
||
config-version: 2 | ||
|
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. I updated this test since the prior version did not detect when the dev schema had extra tickets not present in the prod schema and should cause a failure unless omitted. |
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) | ||
) }} | ||
|
||
-- check that all the tickets are accounted for in the metrics | ||
with stg_count as ( | ||
select | ||
count(*) as stg_ticket_count | ||
from {{ ref('stg_zendesk__ticket') }} | ||
), | ||
|
||
metric_count as ( | ||
select | ||
count(*) as metric_ticket_count | ||
from source | ||
from {{ ref('zendesk__ticket_metrics') }} | ||
) | ||
|
||
select * | ||
from stg_count | ||
join metric_count | ||
on stg_ticket_count != metric_ticket_count |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{{ config( | ||
tags="fivetran_validations", | ||
enabled=var('fivetran_validation_tests_enabled', false) | ||
) }} | ||
|
||
/* | ||
This test is to ensure the sla_elapsed_time from zendesk__sla_policies matches the corresponding time in zendesk__ticket_metrics. | ||
*/ | ||
|
||
with dev_slas as ( | ||
select * | ||
from {{ target.schema }}_zendesk_dev.zendesk__sla_policies | ||
where in_business_hours | ||
|
||
), dev_metrics as ( | ||
select * | ||
from {{ target.schema }}_zendesk_dev.zendesk__ticket_metrics | ||
|
||
), dev_compare as ( | ||
select | ||
dev_slas.ticket_id, | ||
dev_slas.metric, | ||
cast(dev_slas.sla_elapsed_time as {{ dbt.type_int() }}) as time_from_slas, | ||
case when metric = 'agent_work_time' then dev_metrics.agent_work_time_in_business_minutes | ||
when metric = 'requester_wait_time' then dev_metrics.requester_wait_time_in_business_minutes | ||
when metric = 'first_reply_time' then dev_metrics.first_reply_time_business_minutes | ||
end as time_from_metrics | ||
from dev_slas | ||
left join dev_metrics | ||
on dev_metrics.ticket_id = dev_slas.ticket_id | ||
) | ||
|
||
select * | ||
from dev_compare | ||
where abs(time_from_slas - time_from_metrics) >= 5 | ||
{{ "and ticket_id not in " ~ var('fivetran_integrity_sla_metric_parity_exclusion_tickets',[]) ~ "" if var('fivetran_integrity_sla_metric_parity_exclusion_tickets',[]) }} |
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.
I know we somewhat mention it in the logic changes within relevant models, but can we explicitly callout here that this issue was identified and addressed for requester_wait_time and agent_work_time slas.