Skip to content

Commit

Permalink
Merge pull request #48 from fivetran/update/customer360
Browse files Browse the repository at this point in the history
add phone to stg_zendesk__user
  • Loading branch information
fivetran-jamie authored Mar 6, 2024
2 parents ce4da6b + 293e069 commit fceed33
Show file tree
Hide file tree
Showing 11 changed files with 42 additions and 8 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
# dbt_zendesk_source v0.11.1

[PR #48](https://github.com/fivetran/dbt_zendesk_source/pull/48) includes the following updates:

## Feature Updates
- Adds the `phone` field to `stg_zendesk__user` and ensures it is a `string` if the column is not found in your source data.
- Adds documentation for `user` fields that were previously missing yml descriptions.

# dbt_zendesk_source v0.11.0

[PR #46](https://github.com/fivetran/dbt_zendesk_source/pull/46) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
config-version: 2
name: 'zendesk_source'
version: '0.11.0'
version: '0.11.1'
require-dbt-version: [">=1.3.0", "<2.0.0"]
models:
zendesk_source:
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/dbt_project.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
config-version: 2

name: 'zendesk_source_integration_tests'
version: '0.11.0'
version: '0.11.1'

profile: 'integration_tests'

Expand Down Expand Up @@ -100,6 +100,7 @@ seeds:
created_at: timestamp
last_login_at: timestamp
updated_at: timestamp
phone: "{{ 'string' if target.type in ('bigquery', 'spark', 'databricks') else 'varchar' }}"
+enabled: "{{ true if target.type != 'snowflake' else false }}"
user_data_snowflake:
+alias: user_data
Expand Down
2 changes: 1 addition & 1 deletion macros/get_user_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
{"name": "notes", "datatype": dbt.type_int()},
{"name": "only_private_comments", "datatype": "boolean"},
{"name": "organization_id", "datatype": dbt.type_int()},
{"name": "phone", "datatype": dbt.type_int()},
{"name": "phone", "datatype": dbt.type_string()},
{"name": "remote_photo_url", "datatype": dbt.type_int()},
{"name": "restricted_agent", "datatype": "boolean"},
{"name": "role", "datatype": dbt.type_string()},
Expand Down
12 changes: 12 additions & 0 deletions models/src_zendesk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,24 @@ sources:
description: The time the user was created
- name: organization_id
description: The id of the user's organization. If the user has more than one organization memberships, the id of the user's default organization
- name: phone
description: User's phone number.
- name: role
description: The user's role. Possible values are "end-user", "agent", or "admin"
- name: time_zone
description: The user's time zone. See Time Zone
- name: ticket_restriction
description: Specifies which tickets the user has access to. Possible values are organization, groups, assigned, requested and null
- name: suspended
description: Boolean representing whether the user has been suspended, meaning that they can no longer sign in and any new support requests you receive from them are sent to the suspended tickets queue.
- name: external_id
description: A unique identifier from another system. The API treats the id as case insensitive.
- name: updated_at
description: The time the user was last updated.
- name: last_login_at
description: Last time the user signed in to Zendesk Support or made an API request using an API token or basic authentication.
- name: locale
description: The user's locale. A BCP-47 compliant tag for the locale. If both "locale" and "locale_id" are present on create or update, "locale_id" is ignored and only "locale" is used.

- name: schedule
identifier: "{{ var('zendesk_schedule_identifier', 'schedule') }}"
Expand Down
12 changes: 12 additions & 0 deletions models/stg_zendesk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,12 +182,24 @@ models:
description: The time the user was created
- name: organization_id
description: The id of the user's organization. If the user has more than one organization memberships, the id of the user's default organization
- name: phone
description: User's phone number.
- name: role
description: The user's role. Possible values are "end-user", "agent", or "admin"
- name: time_zone
description: The user's time zone. See Time Zone
- name: ticket_restriction
description: Specifies which tickets the user has access to. Possible values are organization, groups, assigned, requested and null
- name: is_suspended
description: Boolean representing whether the user has been suspended, meaning that they can no longer sign in and any new support requests you receive from them are sent to the suspended tickets queue.
- name: external_id
description: A unique identifier from another system. The API treats the id as case insensitive.
- name: updated_at
description: The time the user was last updated.
- name: last_login_at
description: Last time the user signed in to Zendesk Support or made an API request using an API token or basic authentication.
- name: locale
description: The user's locale. A BCP-47 compliant tag for the locale. If both "locale" and "locale_id" are present on create or update, "locale_id" is ignored and only "locale" is used.

- name: stg_zendesk__schedule
description: The support schedules created with different business hours and holidays.
Expand Down
1 change: 1 addition & 0 deletions models/stg_zendesk__user.sql
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ final as (
email,
name,
organization_id,
phone,
{% if var('internal_user_criteria', false) -%}
case
when role in ('admin', 'agent') then role
Expand Down

0 comments on commit fceed33

Please sign in to comment.