-
Notifications
You must be signed in to change notification settings - Fork 29
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
[Question] sla_breach_at confusion #116
Comments
Hi @SethPreissV fair question! We perform aggregations on sla_breach_at because there are multiple records for each ticket, sla, and metric. Re: max sla_breach_at
Re: min sla_breach_at
However, if you're not seeing the correct |
So looking at the int_zendesk__requester_wait_time_business_hours table and an example I have to work with (data below), the SLA_BREACH_AT time that is correct would be "10/18/2023 2:51:00 PM" when IS_BREACHED_DURING_SCHEDULE is TRUE but SLA_BREACH_AT that is shown in ZENDESK__SLA_POLICIES is "10/19/2023 8:51:00 PM" because the max function is used while creating the table. Working the math backwards, "10/18/2023 2:51:00 PM" would be correct based on the original VALID_START_AT and based on the datetime shown in Zendesk itself. If I understand your message correctly, is the SLA being restarted in the dbt code whenever there is another event in the ticket? TICKET_ID SLA_APPLIED_AT TARGET VALID_STARTING_AT VALID_ENDING_AT WEEK_NUMBER TICKET_WEEK_START_TIME_MINUTE TICKET_WEEK_END_TIME_MINUTE SCHEDULE_START_TIME SCHEDULE_END_TIME SCHEDULED_MINUTES RUNNING_TOTAL_SCHEDULED_MINUTES REMAINING_TARGET_MINUTES BREACH_MINUTES BREACH_MINUTES_FROM_WEEK LAG_CHECK IS_BREACHED_DURING_SCHEDULE SLA_BREACH_AT |
Hi @SethPreissV , yes so Ultimately, we grab the max We have realized this worked when we were testing because we didn't have a sla that was breached in the test data, so we didn't test for such case. It may be that the logic needs to be updated to reflect that. Thanks for providing the sample-- if you could provide a csv version of a few example cases it would be very appreciated since it would make it easier to analyze and test! |
Hey @SethPreissV! I saw you may have commented but it got deleted? Also, if we could grab the data in csv form, that you shared, that'd be greatly appreciated! |
This has issue should now be addressed in the latest Please feel free to reopen or create a new issue if the original issue persists following the upgrade. |
Is there an existing issue for this?
Describe the issue
Hey team,
I'm trying to understand sla_breach_at and why the max sla_breach_at for requester_wait_time and min for reply_time is used instead of the sla_breach_at when the is_sla_breach = true. It seems that the existing logic pulls the max/min calculated sla_breach_at instead of the actual time the sla_breach_at was breached for the metric. I feel like I might be missing something.
Relevant error log or model output
Expected behavior
Correct sla_breach_at to be shown in zendesk__sla_policies
dbt Project configurations
name: 'zendesk'
version: '0.11.2'
profile: 'zendesk'
config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
on-run-start: '{{ fivetran_utils.empty_variable_warning("ticket_field_history_columns", "zendesk_ticket_field_history") }}'
models:
zendesk:
+schema: zendesk
+materialized: table
agent_work_time:
+materialized: ephemeral
intermediate:
+schema: zendesk_intermediate
+materialized: table
reply_times:
+materialized: ephemeral
resolution_times:
+materialized: ephemeral
sla_policy:
+schema: zendesk_intermediate
+materialized: table
ticket_history:
+schema: zendesk_intermediate
+materialized: ephemeral
utils:
+materialized: ephemeral
vars:
zendesk:
ticket_field_history_columns: ['assignee_id', 'status', 'priority']
ticket_field_history_updater_columns: []
group: "{{ ref('stg_zendesk__group') }}"
brand: "{{ ref('stg_zendesk__brand') }}"
domain_name: "{{ ref('stg_zendesk__domain_name') }}"
organization_tag: "{{ ref('stg_zendesk__organization_tag') }}"
organization: "{{ ref('stg_zendesk__organization') }}"
schedule: "{{ ref('stg_zendesk__schedule') }}"
ticket: "{{ ref('stg_zendesk__ticket') }}"
ticket_form_history: "{{ ref('stg_zendesk__ticket_form_history') }}"
ticket_comment: "{{ ref('stg_zendesk__ticket_comment') }}"
field_history: "{{ ref('stg_zendesk__ticket_field_history') }}"
ticket_schedule: "{{ ref('stg_zendesk__ticket_schedule') }}"
ticket_tag: "{{ ref('stg_zendesk__ticket_tag') }}"
user_tag: "{{ ref('stg_zendesk__user_tag') }}"
user: "{{ ref('stg_zendesk__user') }}"
daylight_time: "{{ ref('stg_zendesk__daylight_time') }}"
time_zone: "{{ ref('stg_zendesk__time_zone') }}"
using_schedules: true
using_domain_names: true
using_user_tags: true
using_ticket_form_history: true
using_organization_tags: true
Package versions
packages:
package: fivetran/zendesk_source
version: [">=0.8.0", "<0.9.0"]
package: calogica/dbt_date
version: [">=0.7.0", "<0.8.0"]
What database are you using dbt with?
snowflake
dbt Version
Core:
Additional Context
No response
Are you willing to open a PR to help address this issue?
The text was updated successfully, but these errors were encountered: