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

Feature/unstructured data #53

Merged
merged 12 commits into from
Sep 4, 2024
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ steps:
commands: |
bash .buildkite/scripts/run_models.sh redshift

- label: ":bricks: Run Tests - Databricks"
- label: ":databricks: Run Tests - Databricks"
key: "run_dbt_databricks"
plugins:
- docker#v3.13.0:
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# dbt_zendesk_source v0.12.0
[PR #49](https://github.com/fivetran/dbt_zendesk_source/pull/49) includes the following updates:
fivetran-catfritz marked this conversation as resolved.
Show resolved Hide resolved
## Breaking changes
- Added field `_fivetran_deleted` to the following models for use downstream:
- `stg_zendesk__ticket`
- `stg_zendesk__ticket_comment`
- `stg_zendesk__user`
fivetran-joemarkiewicz marked this conversation as resolved.
Show resolved Hide resolved

## Documentation
- Updated documentation to include `_fivetran_deleted`.

# dbt_zendesk_source v0.11.2

[PR #49](https://github.com/fivetran/dbt_zendesk_source/pull/49) includes the following updates:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Include the following zendesk_source package version in your `packages.yml` file
```yaml
packages:
- package: fivetran/zendesk_source
version: [">=0.11.0", "<0.12.0"]
version: [">=0.12.0", "<0.13.0"]
```
## Step 3: Define database and schema variables
By default, this package runs using your target database and the `zendesk` schema. If this is not where your Zendesk Support data is (for example, if your zendesk schema is named `zendesk_fivetran`), add the following configuration to your root `dbt_project.yml` file:
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.2'
version: '0.12.0'
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.

47 changes: 10 additions & 37 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.

2 changes: 1 addition & 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.2'
version: '0.12.0'

profile: 'integration_tests'

Expand Down
1 change: 1 addition & 0 deletions macros/get_ticket_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_deleted", "datatype": dbt.type_boolean()},
{"name": "allow_channelback", "datatype": "boolean"},
{"name": "assignee_id", "datatype": dbt.type_int()},
{"name": "brand_id", "datatype": dbt.type_int()},
Expand Down
1 change: 1 addition & 0 deletions macros/get_ticket_comment_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_string()},
{"name": "_fivetran_deleted", "datatype": dbt.type_boolean()},
{"name": "body", "datatype": dbt.type_string()},
{"name": "call_duration", "datatype": dbt.type_int()},
{"name": "call_id", "datatype": dbt.type_int()},
Expand Down
1 change: 1 addition & 0 deletions macros/get_user_columns.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

{% set columns = [
{"name": "_fivetran_synced", "datatype": dbt.type_timestamp()},
{"name": "_fivetran_deleted", "datatype": dbt.type_boolean()},
{"name": "active", "datatype": "boolean"},
{"name": "alias", "datatype": dbt.type_string()},
{"name": "authenticity_token", "datatype": dbt.type_int()},
Expand Down
6 changes: 6 additions & 0 deletions models/src_zendesk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ sources:
description: The address of the source the ticket was created from
- name: via_source_to_name
description: The name of the source the ticket was created from
- name: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- name: brand
identifier: "{{ var('zendesk_brand_identifier', 'brand')}}"
Expand Down Expand Up @@ -190,6 +192,8 @@ sources:
description: Boolean field indicating if the comment is a twitter tweet
- name: voice_comment
description: Boolean field indicating if the comment is a voice comment
- name: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- name: user_tag
identifier: "{{ var('zendesk_user_tag_identifier', 'user_tag') }}"
Expand Down Expand Up @@ -237,6 +241,8 @@ sources:
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: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- name: schedule
identifier: "{{ var('zendesk_schedule_identifier', 'schedule') }}"
Expand Down
6 changes: 6 additions & 0 deletions models/stg_zendesk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ models:
description: The address of the source the ticket was created from
- name: source_to_name
description: The name of the source the ticket was created from
- name: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- name: stg_zendesk__brand
description: >
Expand Down Expand Up @@ -155,6 +157,8 @@ models:
description: Boolean field indicating if the comment is a twitter tweet
- name: is_voice_comment
description: Boolean field indicating if the comment is a voice comment
- name: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- name: stg_zendesk__user_tag
description: Table containing all tags associated with a user. Only present if your account has user tagging enabled.
Expand Down Expand Up @@ -200,6 +204,8 @@ models:
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: _fivetran_deleted
description: Boolean created by Fivetran to indicate whether the record has been deleted.

- 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__ticket.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final as (
select
id as ticket_id,
_fivetran_synced,
_fivetran_deleted,
assignee_id,
brand_id,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
Expand Down
1 change: 1 addition & 0 deletions models/stg_zendesk__ticket_comment.sql
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ final as (
select
id as ticket_comment_id,
_fivetran_synced,
_fivetran_deleted,
body,
cast(created as {{ dbt.type_timestamp() }}) as created_at,
public as is_public,
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 @@ -31,6 +31,7 @@ final as (
id as user_id,
external_id,
_fivetran_synced,
_fivetran_deleted,
cast(last_login_at as {{ dbt.type_timestamp() }}) as last_login_at,
cast(created_at as {{ dbt.type_timestamp() }}) as created_at,
cast(updated_at as {{ dbt.type_timestamp() }}) as updated_at,
Expand Down