-
Notifications
You must be signed in to change notification settings - Fork 18
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
Add var to persist former-agents' roles for SLA metrics #43
Merged
Merged
Changes from 4 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
9e9000e
docs
fivetran-jamie 7279234
give defaualt value to new var
fivetran-jamie 56a68df
fix formatting
fivetran-jamie ba778b9
more docs
fivetran-jamie b5db00f
add docs
fivetran-jamie 0ddf561
remove prefix from new var
fivetran-jamie b6d3096
joe feedback
fivetran-jamie c245c12
Update CHANGELOG.md
fivetran-jamie 7ea2f4c
Update README.md
fivetran-jamie bafb884
finalizing
fivetran-jamie File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -66,15 +66,25 @@ vars: | |
``` | ||
|
||
## (Optional) Step 5: Additional configurations | ||
<details><summary>Expand to view configurations</summary> | ||
|
||
|
||
### Add passthrough columns | ||
This package includes all source columns defined in the staging models. However, the `stg_zendesk__ticket` model allows for additional columns to be added using a pass-through column variable. This is extremely useful if you'd like to include custom fields to the package. | ||
```yml | ||
vars: | ||
zendesk__ticket_passthrough_columns: [account_custom_field_1, account_custom_field_2] | ||
``` | ||
|
||
### Mark Former Internal Users as Agents | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. reminder to myself to add this to the transform README (no release needed there tho) after approval |
||
If a team member leaves your organization and their internal account is deactivated, their `USER.role` will switch from `agent` or `admin` to `end-user`. This will skew historical ticket SLA metrics, as we calculate reply times and other metrics based on `agent` or `admin` activity only. | ||
|
||
To persist the integrity of historical ticket SLAs and mark these former team members as agents, provide the `zendesk__internal_user_criteria` variable with a SQL clause to identify them, based on fields in the `USER` table: | ||
|
||
```yml | ||
# dbt_project.yml | ||
vars: | ||
zendesk__internal_user_criteria: "lower(email) like '%@fivetran.com' or external_id = 12345 or name in ('Garrett', 'Alfredo')" # can reference any non-custom field in USER | ||
``` | ||
|
||
### Change the build schema | ||
By default, this package builds the zendesk staging models within a schema titled (`<target_schema>` + `_zendesk_source`) in your target database. If this is not where you would like your Zendesk staging data to be written to, add the following configuration to your root `dbt_project.yml` file: | ||
|
||
|
@@ -102,8 +112,7 @@ In this package, this would apply to the `GROUP` source. If you are receiving er | |
vars: | ||
zendesk_group_identifier: "Group" # as an example, must include the double-quotes and correct case! | ||
``` | ||
|
||
</details> | ||
|
||
|
||
## (Optional) Step 6: Orchestrate your models with Fivetran Transformations for dbt Core™ | ||
<details><summary>Expand to view details</summary> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Omg love this example!