Added the internal_user_criteria variable, which can be used to mark internal users whose USER.role may have changed from agent to end-user after they left your organization. This variable accepts SQL that may reference any non-custom field in USER, and it will be wrapped in a case when statement in the stg_zendesk__user model.
Example usage:
# dbt_project.yml
vars:
zendesk_source:
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
Output: In stg_zendesk__user, users who match your criteria and have a role of end-user will have their role switched to agent. This will ensure that downstream SLA metrics are appropriately calculated.
Under the Hood
Updated the way we dynamically disable sources. Previously, we used a custom meta.is_enabled flag, but, since we added this, dbt-core introduced a native config.enabled attribute. We have opted to use the dbt-native config instead.
PR Overview
This PR will address the following Issue/Feature: https://github.com/fivetran/dbt_zendesk/issues/120 and https://github.com/fivetran/dbt_zendesk_source/issues/40
This PR will result in the following new package version:
v0.10.1 -- by default nothing will change for folks. they'll need to explicitly set the internal user criteria var
Please provide the finalized CHANGELOG entry which details the relevant changes included in this PR:
dbt_zendesk_source v0.10.1
PR #43 introduces the following updates:
Feature Updates
internal_user_criteria
variable, which can be used to mark internal users whoseUSER.role
may have changed fromagent
toend-user
after they left your organization. This variable accepts SQL that may reference any non-custom field inUSER
, and it will be wrapped in acase when
statement in thestg_zendesk__user
model.stg_zendesk__user
, users who match your criteria and have a role ofend-user
will have their role switched toagent
. This will ensure that downstream SLA metrics are appropriately calculated.Under the Hood
meta.is_enabled
flag, but, since we added this, dbt-core introduced a nativeconfig.enabled
attribute. We have opted to use the dbt-native config instead.PR Checklist
Basic Validation
Please acknowledge that you have successfully performed the following commands locally:
Before marking this PR as "ready for review" the following have been applied:
Detailed Validation
Please share any and all of your validation steps:
Will validate internally with @jackiexsun