Skip to content

Commit 1a57d7f

Browse files
fivetran-jamiefivetran-data-model-botfivetran-catfritzgithub-actions[bot]
authored
Avoid rounding of ticket and SLA metrics to match UI reports (#204)
* drafting * docs * make breaking and add rounding * postgres bk * cast as numeric before rounding * numerics * changelog * prep for official release * Q2 FY26 Automatic Package Updates (#205) * Q2 FY26: Apply automated update. * Q2 FY26: Update auto-release workflow only. --------- Co-authored-by: fivetran-catfritz <[email protected]> Co-authored-by: Jamie Rodriguez <[email protected]> * how does this look * add different versions * changelog * catherine feedback * Generate dbt docs via GitHub Actions * Update integration_tests/dbt_project.yml Co-authored-by: fivetran-catfritz <[email protected]> * Generate dbt docs via GitHub Actions --------- Co-authored-by: Fivetran Maintainer Bot <[email protected]> Co-authored-by: fivetran-catfritz <[email protected]> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent c3b89f6 commit 1a57d7f

19 files changed

+209
-72
lines changed

.github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@ Before marking this PR as "ready for review":
1212

1313
## PR Overview
1414
**Package version introduced in this PR:**
15-
15+
-
16+
1617
**This PR addresses the following Issue/Feature(s):**
1718
<!-- Add Issue # or internal ticket reference -->
19+
-
1820

1921
**Summary of changes:**
2022
<!-- 1-2 sentences describing PR changes. -->
21-
23+
-
2224

2325
### Submission Checklist
2426
- [ ] Alignment meeting with the reviewer (if needed)
@@ -27,9 +29,10 @@ Before marking this PR as "ready for review":
2729
- [ ] **Validation Steps:** Check for unintentional effects (e.g., add/run consistency & integrity tests)
2830
- [ ] **Testing Instructions:** Confirm the change addresses the issue(s)
2931
- [ ] **Focus Areas:** Complex logic or queries that need extra attention
32+
- [ ] Merge any relevant open PRs into this PR
3033

3134
### Changelog
3235
<!-- Recommend drafting changelog notes, then refining via ChatGPT using:
3336
"Draft a changelog entry based on the following notes." -->
3437
- [ ] Draft changelog for PR
35-
- [ ] Final changelog for release review
38+
- [ ] Final changelog for release review

.github/workflows/auto-release.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ on:
33
pull_request:
44
types:
55
- closed
6-
branches:
7-
- main
6+
- labeled
87

98
jobs:
10-
call-workflow-passing-data:
11-
if: github.event.pull_request.merged
9+
release:
10+
if: |
11+
(github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'main') ||
12+
github.event.label.name == 'pre-release'
1213
uses: fivetran/dbt_package_automations/.github/workflows/auto-release.yml@main
13-
secrets: inherit
14+
secrets: inherit
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: 'generate dbt docs'
2+
on:
3+
pull_request:
4+
types:
5+
- labeled
6+
7+
jobs:
8+
generate-docs:
9+
if: github.event.label.name == 'docs:ready'
10+
uses: fivetran/dbt_package_automations/.github/workflows/generate-docs.yml@main
11+
secrets: inherit
12+
with:
13+
schema_var_name: zendesk_schema

.gitignore

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,73 @@
1-
env/
2-
target/
1+
# dbt
2+
**/package-lock.yml
3+
package-lock.yml
4+
.dbt/
35
dbt_modules/
6+
dbt_packages/
47
logs/
8+
profiles.yml
9+
target/
10+
*.log
11+
12+
# IDE files
13+
.idea/
14+
.vscode/
15+
*~
16+
*.swp
17+
*.swo
18+
19+
# Jupyter Notebook
20+
.ipynb_checkpoints
21+
22+
# OS generated files
23+
**/.DS_Store
524
.DS_Store
6-
dbt_packages/
7-
package-lock.yml
25+
.Spotlight-V100
26+
.Trashes
27+
._*
28+
Thumbs.db
29+
ehthumbs.db
30+
31+
# Python
32+
*.egg
33+
*.egg-info/
34+
*.py[cod]
35+
*.so
36+
*$py.class
37+
.Python
38+
__pycache__/
39+
build/
40+
develop-eggs/
41+
dist/
42+
downloads/
43+
eggs/
44+
.env
45+
.installed.cfg
46+
lib/
47+
lib64/
48+
MANIFEST
49+
parts/
50+
sdist/
51+
var/
52+
wheels/
53+
54+
# Secrets and credentials
55+
.env.*
56+
.secrets
57+
credentials.json
58+
service-account.json
59+
60+
# Temporary files
61+
.cache/
62+
*.temp
63+
*.tmp
64+
65+
# Virtual environments
66+
.conda/
67+
.env
68+
.venv
69+
ENV/
70+
env/
71+
env.bak/
72+
venv/
73+
venv.bak/

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
# dbt_zendesk v0.25.0
2+
3+
## Schema/Data Changes
4+
5+
**2 total changes • 2 possible breaking changes**
6+
| **Data Model/Column** | **Change type** | **Old** | **New** | **Notes** |
7+
| -------------- | --------------- | ------------ | ------------ | --------- |
8+
| [`zendesk__ticket_metrics`](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_metrics)<br>• `first_resolution_business_minutes`<br>• `first_reply_time_business_minutes`<br>• `agent_wait_time_in_business_minutes`<br>• `requester_wait_time_in_business_minutes`<br>• `solve_time_in_business_minutes`<br>• `agent_work_time_in_business_minutes`<br>• `on_hold_time_in_business_minutes`<br>• `new_status_duration_in_business_minutes`<br>• `open_status_duration_in_business_minutes`<br>• `first_reply_time_calendar_minutes`<br>• `total_reply_time_calendar_minutes`<br>• `ticket_unassigned_duration_calendar_minutes`<br>• `requester_last_login_age_minutes`<br>• `assignee_last_login_age_minutes`<br>• `unsolved_ticket_age_minutes`<br>• `unsolved_ticket_age_since_update_minutes` | Column Data Type | Integer | Numeric rounded to four decimal places | Removed logic casting ticket metric values as integers in intermediate models. This may have caused minor rounding discrepancies between the Zendesk data models and UI reports. ([PR #204](https://github.com/fivetran/dbt_zendesk/pull/204)) |
9+
| [`zendesk__sla_policies`](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__sla_policies)<br>• `sla_elapsed_time` | Data Type | Integer | Numeric rounded to four decimal places | May particularly affect `agent_work_time`, `first_reply_time`, `next_reply_time`, and `requester_wait_time` SLA policy metrics. ([PR #204](https://github.com/fivetran/dbt_zendesk/pull/204)) |
10+
11+
### Under the Hood
12+
13+
[PR #205](https://github.com/fivetran/dbt_zendesk/pull/205) includes the following updates:
14+
15+
- Updated conditions in `.github/workflows/auto-release.yml`.
16+
- Added `.github/workflows/generate-docs.yml`.
17+
- Added `+docs: show: False` to `integration_tests/dbt_project.yml`.
18+
- Migrated `flags` (e.g., `send_anonymous_usage_stats`, `use_colors`) from `sample.profiles.yml` to `integration_tests/dbt_project.yml`.
19+
- Updated `maintainer_pull_request_template.md` with improved checklist.
20+
- Updated `.gitignore` to exclude additional DBT, Python, and system artifacts.
21+
22+
# dbt_zendesk v0.25.0-a1
23+
24+
[PR #204](https://github.com/fivetran/dbt_zendesk/pull/204) includes the following updates:
25+
26+
## Bug Fixes
27+
- Removes logic casting ticket metric values as integers in intermediate models. This may have caused minor rounding discrepancies between the Zendesk data models and UI reports.
28+
- This may impact the following fields in the `zendesk__ticket_metrics` model, which will now be **numerics** rounded to the fourth decimal place:
29+
- `first_resolution_business_minutes`
30+
- `full_resolution_business_minutes`
31+
- `first_reply_time_business_minutes`
32+
- `agent_wait_time_in_business_minutes`
33+
- `requester_wait_time_in_business_minutes`
34+
- `solve_time_in_business_minutes`
35+
- `agent_work_time_in_business_minutes`
36+
- `on_hold_time_in_business_minutes`
37+
- `new_status_duration_in_business_minutes`
38+
- `open_status_duration_in_business_minutes`
39+
- `first_reply_time_calendar_minutes`
40+
- `total_reply_time_calendar_minutes`
41+
- `ticket_unassigned_duration_calendar_minutes`
42+
- `requester_last_login_age_minutes`
43+
- `assignee_last_login_age_minutes`
44+
- `unsolved_ticket_age_minutes`
45+
- `unsolved_ticket_age_since_update_minutes`
46+
- Particularly for the following SLA policy metrics, this may impact `zendesk__sla_policies.sla_elapsed_time`, which is also now a **numeric** rounded to the fourth decimal place:
47+
- `agent_work_time`
48+
- `first_reply_time`
49+
- `next_reply_time`
50+
- `requester_wait_time`
51+
152
# dbt_zendesk v0.24.2
253

354
This release includes the following updates:

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Include the following zendesk package version in your `packages.yml` file:
6868
```yml
6969
packages:
7070
- package: fivetran/zendesk
71-
version: [">=0.24.0", "<0.25.0"]
71+
version: [">=0.25.0", "<0.26.0"]
7272
```
7373
> **Note**: Do not include the Zendesk Support source package. The Zendesk Support transform package already has a dependency on the source in its own `packages.yml` file.
7474

@@ -119,7 +119,7 @@ sources:
119119
database: <database_name>
120120
loader: fivetran
121121
loaded_at_field: _fivetran_synced
122-
122+
123123
freshness: # feel free to adjust to your liking
124124
warn_after: {count: 72, period: hour}
125125
error_after: {count: 168, period: hour}
@@ -276,7 +276,7 @@ models:
276276
zendesk_source:
277277
+schema: my_new_schema_name # leave blank for just the target_schema
278278
```
279-
279+
280280
#### Change the source table references
281281
If an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable:
282282

@@ -292,14 +292,14 @@ vars:
292292
### (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™
293293
<details><summary>Expand for details</summary>
294294
<br>
295-
295+
296296
Fivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core setup guides](https://fivetran.com/docs/transformations/dbt#setupguide).
297297
</details>
298298

299299
## Does this package have dependencies?
300300
This dbt package is dependent on the following dbt packages. These dependencies are installed by default within this package. For more information on the following packages, refer to the [dbt hub](https://hub.getdbt.com/) site.
301301
> IMPORTANT: If you have any of these dependent packages in your own `packages.yml` file, we highly recommend that you remove them from your root `packages.yml` to avoid package version conflicts.
302-
302+
303303
```yml
304304
packages:
305305
- package: fivetran/zendesk_source

dbt_project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'zendesk'
2-
version: '0.24.2'
2+
version: '0.25.0'
33

44
config-version: 2
55
require-dbt-version: [">=1.3.0", "<2.0.0"]

docs/catalog.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/manifest.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

integration_tests/dbt_project.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
config-version: 2
22

33
name: 'zendesk_integration_tests'
4-
version: '0.24.2'
4+
version: '0.25.0'
55

66
profile: 'integration_tests'
77

@@ -30,9 +30,9 @@ vars:
3030
zendesk_ticket_chat_event_identifier: "ticket_chat_event_data"
3131

3232
## Uncomment for docs generation
33-
# zendesk__unstructured_enabled: True
34-
# using_ticket_chat: true
35-
# using_audit_log: true
33+
# zendesk__unstructured_enabled: True # @docs-include
34+
# using_ticket_chat: true # @docs-include
35+
# using_audit_log: true # @docs-include
3636

3737
# For validation testing. To be commented out before release.
3838
# using_domain_names: false
@@ -48,6 +48,8 @@ models:
4848
+schema: "zendesk_{{ var('directed_schema','dev') }}"
4949

5050
seeds:
51+
+docs:
52+
show: False
5153
+quote_columns: "{{ true if target.type == 'redshift' else false }}"
5254
zendesk_integration_tests:
5355
+column_types:
@@ -175,4 +177,5 @@ dispatch:
175177
search_order: ['spark_utils', 'dbt_utils']
176178

177179
flags:
178-
send_anonymous_usage_stats: False
180+
send_anonymous_usage_stats: False
181+
use_colors: True

0 commit comments

Comments
 (0)