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

release/v0.13.0 #127

Merged
merged 33 commits into from
Nov 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
01a81bc
fix(int_zendesk__schedule_spine): offset holiday start/end time too
Oct 24, 2023
5c3c3da
delete .idea/.gitignore
cth84 Oct 24, 2023
6bcb95a
Add new solve time metrics
fivetran-avinash Nov 7, 2023
8057a5b
fix integration test errors
fivetran-avinash Nov 8, 2023
c7793af
changelog
fivetran-avinash Nov 8, 2023
db0ac05
fix integration test errors
fivetran-avinash Nov 8, 2023
4c7711d
Apply customer changes
fivetran-avinash Nov 10, 2023
cfde69f
schedule spine investigation
fivetran-avinash Nov 13, 2023
04696ef
calogica version expansion
fivetran-avinash Nov 14, 2023
c989ab0
remove holiday work schedule changes
fivetran-avinash Nov 15, 2023
2213ec2
bugfix/holidat-utc-offset
fivetran-joemarkiewicz Nov 20, 2023
375b24f
Delete integration_tests/package-lock.yml
fivetran-avinash Nov 20, 2023
aa99440
PR fixes
fivetran-avinash Nov 20, 2023
69041f2
Merge branch 'release/solve-time-metrics-and-holiday-work-schedule-fi…
fivetran-avinash Nov 20, 2023
d404cc9
CHANGELOG
fivetran-avinash Nov 21, 2023
20c9588
documentation updates
fivetran-joemarkiewicz Nov 27, 2023
9df9d9a
github folder fix
fivetran-joemarkiewicz Nov 27, 2023
3f5c40f
schema change
fivetran-joemarkiewicz Nov 27, 2023
2341c87
Merge pull request #118 from cth84/fix/schedule_spine_holiday_check
fivetran-joemarkiewicz Nov 27, 2023
1e9aa12
merge changes
fivetran-joemarkiewicz Nov 27, 2023
32e3667
release/v0.13.0
fivetran-joemarkiewicz Nov 27, 2023
145e276
Merge branch 'release/v0.13.0' into bugfix/holiday-check-utc-offset
fivetran-joemarkiewicz Nov 27, 2023
8440fc4
requirements edit
fivetran-joemarkiewicz Nov 27, 2023
e53475e
schema adjustment again
fivetran-joemarkiewicz Nov 28, 2023
541c151
revert spine logic
fivetran-avinash Nov 28, 2023
23479e2
syntax
fivetran-avinash Nov 28, 2023
0d216c6
Merge pull request #123 from fivetran/release/solve-time-metrics-and-…
fivetran-joemarkiewicz Nov 28, 2023
e052952
merge conflict changes
fivetran-joemarkiewicz Nov 28, 2023
39f93ab
last merge conflict
fivetran-joemarkiewicz Nov 28, 2023
070aebb
Merge pull request #126 from fivetran/bugfix/holiday-check-utc-offset
fivetran-joemarkiewicz Nov 28, 2023
dfec9f3
changelog pr links
fivetran-joemarkiewicz Nov 29, 2023
f9855a2
docs regen
fivetran-joemarkiewicz Nov 29, 2023
56f70cb
packageyml update
fivetran-joemarkiewicz Nov 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

25 changes: 25 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE/maintainer_pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
## PR Overview
**This PR will address the following Issue/Feature:**

**This PR will result in the following new package version:**
<!--- Please add details around your decision for breaking vs non-breaking version upgrade. If this is a breaking change, were backwards-compatible options explored? -->

**Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:**
<!--- Copy/paste the CHANGELOG for this version below. -->

## PR Checklist
### Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
- [ ] dbt run –full-refresh && dbt test
- [ ] dbt run (if incremental models are present)

Before marking this PR as "ready for review" the following have been applied:
- [ ] The appropriate issue has been linked, tagged, and properly assigned
- [ ] All necessary documentation and version upgrades have been applied
- [ ] docs were regenerated (unless this PR does not include any code or yml updates)
- [ ] BuildKite integration tests are passing
- [ ] Detailed validation steps have been provided below

### Detailed Validation
Please share any and all of your validation steps:
<!--- Provide the steps you took to validate your changes below. -->
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
# dbt_zendesk v0.13.0

## 🚨 Breaking Change (Snowflake users) 🚨
- We have changed our identifier logic in the initial Zendesk source package to account for `group` being both a Snowflake reserved word and a source table. Given `dbt_zendesk_source` is a dependency for this package, Snowflake users will want to execute a `dbt run --full-refresh` before using the new version of the package. [PR #42](https://github.com/fivetran/dbt_zendesk_source/pull/42)

## Bug Fixes
- Updates the `int_zendesk__schedule_spine` model to convert the Holiday schedules into proper UTC values before being used in comparison with the schedule times. This ensures the holidays are properly mapped to schedules regardless of timezones. ([PR #126](https://github.com/fivetran/dbt_zendesk/pull/126))

## 🚀 Feature Updates 🚀
- Added `solve_time_in_calendar_minutes` and `solve_time_in_business_minutes` to our `zendesk__ticket_metrics` model, which calculates calendar and business minutes for when the ticket was in the 'new', 'open', 'hold', or 'pending' status. ([PR #123](https://github.com/fivetran/dbt_zendesk/pull/123))

## 🔎 Under the Hood 🔎
- Updated the seed files and seed file configurations for the package integration tests to align with changes in dbt_zendesk_source made in [PR #42](https://github.com/fivetran/dbt_zendesk_source/pull/42) for applying the `dbt_utils.star` macro.
- Corrected the folder structure for the `.github` folder to properly categorize the Community and Maintainer PR templates. ([PR #126](https://github.com/fivetran/dbt_zendesk/pull/126))

## Contributors
- [@fivetran-jessicacherny](https://github.com/fivetran-jessicacherny) ([Issue #119](https://github.com/fivetran/dbt_zendesk/issues/119))
- [@cth84](https://github.com/cth84) ([PR #118](https://github.com/fivetran/dbt_zendesk/pull/118))

# dbt_zendesk v0.12.0

This release includes fixes to issues introduced in v0.11.0-v0.11.1 surrounding the incorporation of schedule holidays.
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Include the following zendesk package version in your `packages.yml` file:
```yml
packages:
- package: fivetran/zendesk
version: [">=0.12.0", "<0.13.0"]
version: [">=0.13.0", "<0.14.0"]

```
> **Note**: Do not include the Zendesk source package. The Zendesk transform package already has a dependency on the source in its own `packages.yml` file.
Expand Down Expand Up @@ -175,7 +175,7 @@ This dbt package is dependent on the following dbt packages. Please be aware tha
```yml
packages:
- package: fivetran/zendesk_source
version: [">=0.9.0", "<0.10.0"]
version: [">=0.10.0", "<0.11.0"]

- package: fivetran/fivetran_utils
version: [">=0.4.0", "<0.5.0"]
Expand Down
3 changes: 2 additions & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: 'zendesk'
version: '0.12.0'
version: '0.13.0'


config-version: 2
require-dbt-version: [">=1.3.0", "<2.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion docs/catalog.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/manifest.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/run_results.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion integration_tests/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ target/
dbt_modules/
logs/
.DS_Store
dbt_packages/
dbt_packages/
package-lock.yml
10 changes: 5 additions & 5 deletions integration_tests/ci/sample.profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ integration_tests:
pass: "{{ env_var('CI_REDSHIFT_DBT_PASS') }}"
dbname: "{{ env_var('CI_REDSHIFT_DBT_DBNAME') }}"
port: 5439
schema: zendesk_integration_tests_2
schema: zendesk_integration_tests_40
threads: 8
bigquery:
type: bigquery
method: service-account-json
project: 'dbt-package-testing'
schema: zendesk_integration_tests_2
schema: zendesk_integration_tests_40
threads: 8
keyfile_json: "{{ env_var('GCLOUD_SERVICE_KEY') | as_native }}"
snowflake:
Expand All @@ -33,7 +33,7 @@ integration_tests:
role: "{{ env_var('CI_SNOWFLAKE_DBT_ROLE') }}"
database: "{{ env_var('CI_SNOWFLAKE_DBT_DATABASE') }}"
warehouse: "{{ env_var('CI_SNOWFLAKE_DBT_WAREHOUSE') }}"
schema: zendesk_integration_tests_2
schema: zendesk_integration_tests_40
threads: 8
postgres:
type: postgres
Expand All @@ -42,13 +42,13 @@ integration_tests:
pass: "{{ env_var('CI_POSTGRES_DBT_PASS') }}"
dbname: "{{ env_var('CI_POSTGRES_DBT_DBNAME') }}"
port: 5432
schema: zendesk_integration_tests_2
schema: zendesk_integration_tests_40
threads: 8
databricks:
catalog: "{{ env_var('CI_DATABRICKS_DBT_CATALOG') }}"
host: "{{ env_var('CI_DATABRICKS_DBT_HOST') }}"
http_path: "{{ env_var('CI_DATABRICKS_DBT_HTTP_PATH') }}"
schema: zendesk_integration_tests_2
schema: zendesk_integration_tests_40
threads: 8
token: "{{ env_var('CI_DATABRICKS_DBT_TOKEN') }}"
type: databricks
58 changes: 33 additions & 25 deletions integration_tests/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
config-version: 2

name: 'zendesk_integration_tests'
version: '0.12.0'
version: '0.13.0'

profile: 'integration_tests'

vars:
zendesk_schema: zendesk_integration_tests_2
zendesk_schema: zendesk_integration_tests_40
zendesk_source:
zendesk_organization_identifier: "organization_data"
zendesk_schedule_identifier: "schedule_data"
Expand All @@ -20,15 +20,17 @@ vars:
zendesk_domain_name_identifier: "domain_name_data"
zendesk_time_zone_identifier: "time_zone_data"
zendesk_daylight_time_identifier: "daylight_time_data"
group: "{{ ref('group_data') }}"
brand: "{{ fivetran_utils.seed_data_helper('brand_data',['postgres']) }}"
user_tag: "{{ fivetran_utils.snowflake_seed_data('user_tag_data') }}"
organization_tag: "{{ fivetran_utils.snowflake_seed_data('organization_tag_data') }}"
user: "{{ fivetran_utils.snowflake_seed_data('user_data') }}"
zendesk_brand_identifier: "brand_data"
zendesk_group_identifier: "group_data"
zendesk_organization_tag_identifier: "organization_tag_data"
zendesk_user_identifier: "user_data"
zendesk_user_tag_identifier: "user_tag_data"

seeds:
+quote_columns: "{{ true if target.type == 'redshift' else false }}"
zendesk_integration_tests:
+column_types:
_fivetran_synced: timestamp
+column_types:
_fivetran_synced: timestamp
group_data:
Expand Down Expand Up @@ -74,7 +76,6 @@ seeds:
requester_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
submitter_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
ticket_form_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
type: "{{ 'varchar(100)' if target.type in ('redshift', 'postgres') else 'string'}}"
ticket_field_history_data:
+column_types:
ticket_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
Expand All @@ -88,24 +89,33 @@ seeds:
user_data:
+column_types:
id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
external_id: "{{ 'varchar(100)' if target.type in ('redshift', 'postgres') else 'string'}}"
external_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
locale_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
created_at: timestamp
last_login_at: timestamp
updated_at: timestamp
+enabled: "{{ true if target.type != 'snowflake' else false }}"
user_tag_data:
user_data_snowflake:
+alias: user_data
+column_types:
user_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
external_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
locale_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
created_at: timestamp
last_login_at: timestamp
updated_at: timestamp
+enabled: "{{ true if target.type == 'snowflake' else false }}"
brand_data:
+column_types:
id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
+enabled: "{{ true if target.type != 'postgres' else false }}"
brand_data_postgres:
+alias: brand_data
+column_types:
id: bigint
id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
+enabled: "{{ true if target.type == 'postgres' else false }}"
ticket_form_history_data:
Expand All @@ -116,25 +126,23 @@ seeds:
+column_types:
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
organization_tag_data:
user_tag_data:
+column_types:
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
user_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
user_data_snowflake:
+column_types:
id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
external_id: "{{ 'varchar(100)' if target.type in ('redshift', 'postgres') else 'string'}}"
locale_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
created_at: timestamp
last_login_at: timestamp
+enabled: "{{ true if target.type == 'snowflake' else false }}"
+enabled: "{{ true if target.type != 'snowflake' else false }}"
user_tag_data_snowflake:
+alias: user_tag_data
+enabled: "{{ true if target.type == 'snowflake' else false }}"
organization_tag_data:
+column_types:
organization_id: "{{ 'int64' if target.type == 'bigquery' else 'bigint' }}"
_fivetran_synced: timestamp
+enabled: "{{ true if target.type != 'snowflake' else false }}"
organization_tag_data_snowflake:
+alias: organization_tag_data
+enabled: "{{ true if target.type == 'snowflake' else false }}"


dispatch:
- macro_namespace: dbt_utils
search_order: ['spark_utils', 'dbt_utils']
4 changes: 1 addition & 3 deletions integration_tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@ dbt-redshift>=1.3.0,<2.0.0
dbt-postgres>=1.3.0,<2.0.0
dbt-spark>=1.3.0,<2.0.0
dbt-spark[PyHive]>=1.3.0,<2.0.0
dbt-databricks>=1.3.0,<2.0.0

oscrypto @ git+https://github.com/wbond/oscrypto.git@d5f3437
dbt-databricks>=1.6.0,<2.0.0
2 changes: 1 addition & 1 deletion integration_tests/seeds/ticket_data.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id,_fivetran_synced,allow_channelback,assignee_id,brand_id,created_at,description,due_at,external_id,forum_topic_id,group_id,has_incidents,is_public,organization_id,priority,problem_id,recipient,requester_id,status,subject,submitter_id,system_client,ticket_form_id,type,updated_at,url,via_channel,via_source_from_id,via_source_from_title,via_source_rel,via_source_to_address,via_source_to_name,merged_ticket_ids,via_source_from_address,followup_ids,via_followup_source_id
1595,2020-03-20 02:32:49.426,FALSE,,360003529474,2020-02-19 01:54:52,description1,,,,360006965034,FALSE,TRUE,370295712714,,,email@email.com,396331237134,deleted,subject1,396331237134,,360002048693,,2020-02-19 01:55:11,https://zendesk.com/api/v2/tickets/1595.json,web,,,,example@email.com,,[],,,
1595,2020-03-20 02:32:49.426,FALSE,,360003529474,2020-02-19 01:54:52,description1,,,,360006965034,FALSE,TRUE,370295712714,,,email@email.com,396331237134,deleted,subject1,396331237134,,360002048693,incident,2020-02-19 01:55:11,https://zendesk.com/api/v2/tickets/1595.json,web,,,,example@email.com,,[],,,
16988,2021-01-13 20:09:16.325,FALSE,418284131934,360003529474,2020-12-22 00:19:23,description1,,,,360013366274,FALSE,TRUE,370469077513,,,email@email.com,1500656884401,solved,subject1,1500656884401,,360002048693,,2021-01-13 18:42:39,https://zendesk.com/api/v2/tickets/16988.json,email,,,,example@email.com,Support,[],,[],
14173,2020-11-11 20:08:45.130,FALSE,396371699653,360003529474,2020-10-28 12:03:02,description1,,,,360006965034,FALSE,TRUE,370321120273,,,email@email.com,424883466453,closed,subject1,424883466453,,360002048693,,2020-11-11 17:01:32,https://zendesk.com/api/v2/tickets/14173.json,email,,,,example@email.com,Support,[],,,
11071,2020-10-02 14:08:33.216,FALSE,,360003529474,2020-08-28 18:06:36,description1,,,,,FALSE,TRUE,,,,email@email.com,419755385214,deleted,subject1,419755385214,,360002048693,,2020-09-02 11:01:27,https://zendesk.com/api/v2/tickets/11071.json,email,,,,X,Support,[],,,
Expand Down
Loading