Skip to content

Commit

Permalink
Merge branch 'feature/add-union-data-v2' of https://github.com/fivetr…
Browse files Browse the repository at this point in the history
…an/dbt_zendesk into feature/add-union-data-v2
  • Loading branch information
fivetran-jamie committed Dec 2, 2024
2 parents c8c385e + 2fa6184 commit 7670821
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- Cleaned up the column-level documentation descriptions for the `zendesk__ticket_enriched` and `zendesk__ticket_metrics` models.

## Under the Hood
(maintainers only).
- Relevant to package maintainers only:
- Added a consistency data validation test for each end model.
- Added `consistency_test_exclude_fields` to ignore in consistency tests. These are largely timestamp fields that can differ slightly due to different runtimes, but `source_relation` is also currently included due to the nature of this update.
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,10 @@ vars:
zendesk_schema: your_schema_name
```

> **Note**: When running the package with a single source connector, the `source_relation` column in each model will be populated with an empty string.

#### Option B: Union multiple connectors
If you have multiple Zendesk connectors in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. For each source table, the package will union all of the data together and pass the unioned table into the transformations. You will be able to see which source each record came from in the `source_relation` column of each model.
If you have multiple Zendesk connectors in Fivetran and would like to use this package on all of them simultaneously, we have provided functionality to do so. For each source table, the package will union all of the data together and pass the unioned table into the transformations. The `source_relation` column in each model indicates the origin of each record.

To use this functionality, you will need to set the `zendesk_sources` variable in your root `dbt_project.yml` file:

Expand Down Expand Up @@ -134,6 +136,8 @@ vars:
```

### Step 4: Enable/Disable models for non-existent sources

> _This step is optional if you are unioning multiple connectors together in the previous step. The `union_data` macro will create empty staging models for sources that are not found in any of your Zendesk schemas/databases. However, you can still leverage the below variables if you would like to avoid this behavior._
This package takes into consideration that not every Zendesk Support account utilizes the `schedule`, `schedule_holiday`, `ticket_schedule`, `daylight_time`, `time_zone`, `audit_log`, `domain_name`, `user_tag`, `organization_tag`, or `ticket_form_history` features, and allows you to disable the corresponding functionality. By default, all variables' values are assumed to be `true`, except for `using_schedule_histories`. Add variables for only the tables you want to enable/disable:
```yml
vars:
Expand Down

0 comments on commit 7670821

Please sign in to comment.