Skip to content
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

Bugfix/add schedule holiday #94

Closed
wants to merge 23 commits into from

Conversation

fivetran-reneeli
Copy link
Contributor

@fivetran-reneeli fivetran-reneeli commented Apr 16, 2023

Are you a current Fivetran customer?

Internal
What change(s) does this PR introduce?

Make downstream updates following the addition of the schedule_holiday table. Business resolution time calculations have been updated to account for holidays overlapping with ticket timelines. This includes the first_resolution_business_minutes, full_resolution_business_minutes, first_reply_time_business_minutes fields.

Did you update the CHANGELOG?

  • Yes

Does this PR introduce a breaking change?

  • Yes (please provide breaking change details below.)
  • No (please provide an explanation as to how the change is non-breaking below.)
    Updated logic to existing fields

Did you update the dbt_project.yml files with the version upgrade (please leverage standard semantic versioning)? (In both your main project and integration_tests)

  • Yes

Is this PR in response to a previously created Bug or Feature Request

  • Yes, Issue/Feature #92
  • No

How did you test the PR changes?

  • Buildkite
  • Local (please provide additional testing details below)

Select which warehouse(s) were used to test the PR

  • BigQuery
  • Redshift
  • Snowflake
  • Postgres
  • Databricks
  • Other (provide details below)

Provide an emoji that best describes your current mood

💃

Feedback

We are so excited you decided to contribute to the Fivetran community dbt package! We continue to work to improve the packages and would greatly appreciate your feedback on our existing dbt packages or what you'd like to see next.

@fivetran-reneeli
Copy link
Contributor Author

  • reminder to update docs


-- we'll use these to determine which schedule version to associate tickets with
split_timezones.valid_from,
split_timezones.valid_until

from schedule
join schedule_holiday
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be a left join right?

Comment on lines 22 to 33
{% if var('using_schedules', True) %}

), ticket_schedule as (

select *
from {{ ref('stg_zendesk__ticket_schedule') }}

), schedule_holiday as (

select *
from {{ ref('stg_zendesk__schedule_holiday') }}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why are we bringing these tables in here now? if we need to, is there a simpler way to bring in the holiday information?

dbt_date.week_start('schedule_holiday.holiday_end_date_at'),
'schedule_holiday.holiday_end_date_at',
'second') }} /60
) as holiday_end_time_from_week,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens if the holiday starts in one week and ends in the other? it'd be ideal to just work with the holiday_start_time_from_week and compute the raw_delta between holiday_start_date_at and holiday_end_date_at right here. this is similar to how we store the end dates of tickets

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or rather dbt_date.week_start should truncate the holiday start date?

@fivetran-joemarkiewicz
Copy link
Contributor

Closing this PR as PR #98 includes the relevant changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants