{"id":22793254,"url":"https://github.com/fivetran/dbt_zendesk","last_synced_at":"2026-04-02T14:11:27.262Z","repository":{"id":37232374,"uuid":"257471318","full_name":"fivetran/dbt_zendesk","owner":"fivetran","description":"Fivetran's Zendesk Support dbt package","archived":false,"fork":false,"pushed_at":"2026-03-31T21:26:00.000Z","size":6891,"stargazers_count":30,"open_issues_count":20,"forks_count":30,"subscribers_count":42,"default_branch":"main","last_synced_at":"2026-03-31T21:33:59.239Z","etag":null,"topics":["dbt","dbt-packages","fivetran","zendesk"],"latest_commit_sha":null,"homepage":"https://fivetran.github.io/dbt_zendesk/#!/overview","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fivetran.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-04-21T03:37:12.000Z","updated_at":"2026-03-31T20:34:20.000Z","dependencies_parsed_at":"2026-03-09T23:01:35.099Z","dependency_job_id":null,"html_url":"https://github.com/fivetran/dbt_zendesk","commit_stats":{"total_commits":541,"total_committers":18,"mean_commits":"30.055555555555557","dds":0.4565619223659889,"last_synced_commit":"6b8c218630b39f5bea4205008d314dd65342f713"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"purl":"pkg:github/fivetran/dbt_zendesk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_zendesk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_zendesk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_zendesk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_zendesk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fivetran","download_url":"https://codeload.github.com/fivetran/dbt_zendesk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fivetran%2Fdbt_zendesk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307602,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dbt","dbt-packages","fivetran","zendesk"],"created_at":"2024-12-12T03:18:49.314Z","updated_at":"2026-04-02T14:11:27.244Z","avatar_url":"https://github.com/fivetran.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--section=\"zendesk_transformation_model\"--\u003e\n# Zendesk dbt Package\n\nThis dbt package transforms data from Fivetran's Zendesk connector into analytics-ready tables.\n\n## Resources\n\n- Number of materialized models¹: 82\n- Connector documentation\n  - [Zendesk connector documentation](https://fivetran.com/docs/connectors/applications/zendesk)\n  - [Zendesk ERD](https://fivetran.com/docs/connectors/applications/zendesk#schemainformation)\n- dbt package documentation\n  - [GitHub repository](https://github.com/fivetran/dbt_zendesk)\n  - [dbt Docs](https://fivetran.github.io/dbt_zendesk/#!/overview)\n  - [DAG](https://fivetran.github.io/dbt_zendesk/#!/overview?g_v=1)\n  - [Changelog](https://github.com/fivetran/dbt_zendesk/blob/main/CHANGELOG.md)\n- dbt Core™ supported versions\n  - `\u003e=1.3.0, \u003c3.0.0`\n\n## What does this dbt package do?\nThis package enables you to better understand the performance of your Support team and analyze ticket velocity over time. It creates enriched models with metrics focused on response times, resolution times, and work times.\n\n### Output schema\nFinal output tables are generated in the following target schema:\n\n```\n\u003cyour_database\u003e.\u003cconnector/schema_name\u003e_zendesk\n```\n\n### Final output tables\n\nBy default, this package materializes the following final tables:\n\n| Table | Description |\n| :---- | :---- |\n| [zendesk__ticket_metrics](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_metrics) | Analyzes support team performance with metrics on reply times, resolution times, and total work times. Supports both calendar and business hours for flexible reporting. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eWhat is the average first reply time for tickets by priority level or support team?\u003c/li\u003e\u003cli\u003eHow do resolution times compare across different ticket channels or customer segments?\u003c/li\u003e\u003cli\u003eWhich agents or groups have the longest work times relative to their ticket volume?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__ticket_enriched](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_enriched) | Provides complete context for every ticket including assignees, requesters, organizations, groups, and tags to understand relationships and patterns across the support operation. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eWhich tags or ticket categories generate the most support volume?\u003c/li\u003e\u003cli\u003eHow are tickets distributed across assignees, groups, and organizations?\u003c/li\u003e\u003cli\u003eWhat types of requesters or organizations submit the highest-priority tickets?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__ticket_summary](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_summary) | A high-level overview providing aggregate statistics about the entire support operation, including total tickets, active users, and key volume metrics. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eWhat is the total volume of tickets and active users across the support system?\u003c/li\u003e\u003cli\u003eHow many tickets are currently open versus resolved?\u003c/li\u003e\u003cli\u003eWhat percentage of tickets are being handled by active agents?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__ticket_backlog](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_backlog) | A daily snapshot of all open tickets (excluding closed, deleted, or solved), showing how ticket properties change over time for backlog analysis and trend monitoring. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eHow has the backlog size changed over time by status, priority, or assignee?\u003c/li\u003e\u003cli\u003eWhich groups or agents consistently carry the largest backlog?\u003c/li\u003e\u003cli\u003eAre there seasonal trends or spikes in open ticket volume?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__ticket_field_history](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__ticket_field_history) | A daily historical record tracking how ticket properties evolve throughout their lifecycle, including status changes, reassignments, and priority updates, along with who made each change. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eHow long do tickets spend in each status before moving to the next stage?\u003c/li\u003e\u003cli\u003eHow frequently are tickets reassigned between agents or groups?\u003c/li\u003e\u003cli\u003eWhat is the typical lifecycle progression of tickets by priority or type?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__sla_policies](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__sla_policies) | Tracks SLA compliance and breach metrics for every policy event to help monitor whether tickets meet service level targets in both calendar and business hours. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eWhat percentage of tickets are breaching their SLA targets by policy type?\u003c/li\u003e\u003cli\u003eWhich teams or agents have the highest SLA compliance rates?\u003c/li\u003e\u003cli\u003eHow do SLA breach rates differ between business hours and calendar hours?\u003c/li\u003e\u003c/ul\u003e |\n| [zendesk__document](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__document) | Prepares ticket text content for AI and machine learning applications by segmenting it into optimized chunks for vectorization, sentiment analysis, topic modeling, or automated categorization. Disabled by default. \u003cbr\u003e\u003cbr\u003e**Example Analytics Questions:**\u003cbr\u003e\u003cul\u003e\u003cli\u003eWhat are the most common topics or themes in customer support tickets?\u003c/li\u003e\u003cli\u003eHow can we categorize ticket content for automated routing or tagging?\u003c/li\u003e\u003cli\u003eWhich text patterns correlate with high-priority or escalated tickets?\u003c/li\u003e\u003c/ul\u003e |\n\n¹ Each Quickstart transformation job run materializes these models if all components of this data model are enabled. This count includes all staging, intermediate, and final models materialized as `view`, `table`, or `incremental`.\n\n---\n\n## Visualizations\nMany of the above reports are now configurable for [visualization via Streamlit](https://github.com/fivetran/streamlit_zendesk). Check out some [sample reports here](https://fivetran-zendesk.streamlit.app/).\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://fivetran-zendesk.streamlit.app/\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/fivetran/dbt_zendesk/main/images/sla_policy_streamlit_example.png\" alt=\"Zendesk Streamlit App\" width=\"75%\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n## Prerequisites\nTo use this dbt package, you must have the following:\n\n- At least one Fivetran Zendesk connection syncing data into your destination.\n- A **BigQuery**, **Snowflake**, **Redshift**, **PostgreSQL**, or **Databricks** destination.\n\n## How do I use the dbt package?\nYou can either add this dbt package in the Fivetran dashboard or import it into your dbt project:\n\n- To add the package in the Fivetran dashboard, follow our [Quickstart guide](https://fivetran.com/docs/transformations/data-models/quickstart-management).\n- To add the package to your dbt project, follow the setup instructions in the dbt package's [README file](https://github.com/fivetran/dbt_zendesk/blob/main/README.md#how-do-i-use-the-dbt-package) to use this package.\n\n\u003c!--section-end--\u003e\n\n### Install the package\nInclude the following zendesk package version in your `packages.yml` file:\n\u003e TIP: Check [dbt Hub](https://hub.getdbt.com/) for the latest installation instructions or [read the dbt docs](https://docs.getdbt.com/docs/package-management) for more information on installing packages.\n```yml\npackages:\n  - package: fivetran/zendesk\n    version: [\"\u003e=1.5.0\", \"\u003c1.6.0\"]\n```\n\u003e All required sources and staging models are now bundled into this transformation package. Do not include `fivetran/zendesk_source` in your `packages.yml` since this package has been deprecated.\n\n#### Databricks Dispatch Configuration\nIf you are using a Databricks destination with this package you will need to add the below (or a variation of the below) dispatch configuration within your `dbt_project.yml`. This is required in order for the package to accurately search for macros within the `dbt-labs/spark_utils` then the `dbt-labs/dbt_utils` packages respectively.\n```yml\ndispatch:\n  - macro_namespace: dbt_utils\n    search_order: ['spark_utils', 'dbt_utils']\n```\n\n### Define database and schema variables\n#### Option A: Single connection\nBy default, this package runs using your destination and the `zendesk` schema. If this is not where your zendesk data is (for example, if your zendesk schema is named `zendesk_fivetran`), update the following variables in your root `dbt_project.yml` file accordingly:\n\n```yml\nvars:\n    zendesk_database: your_destination_name\n    zendesk_schema: your_schema_name \n```\n\n\u003e **Note**: When running the package with a single source connection, the `source_relation` column in each model will be populated with an empty string.\n\n#### Option B: Union multiple connections\nIf you have multiple Zendesk connections 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.\n\nTo use this functionality, you will need to set the `zendesk_sources` variable in your root `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n\nvars:\n  zendesk_sources:\n    - database: connection_1_destination_name # Required\n      schema: connection_1_schema_name # Required\n      name: connection_1_source_name # Required only if following the step in the following subsection\n\n    - database: connection_2_destination_name\n      schema: connection_2_schema_name\n      name: connection_2_source_name\n```\n\n##### Recommended: Incorporate unioned sources into DAG\n\u003e *If you are running the package through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt#transformationsfordbtcore), the below step is necessary in order to synchronize model runs with your Zendesk connections. Alternatively, you may choose to run the package through Fivetran [Quickstart](https://fivetran.com/docs/transformations/quickstart), which would create separate sets of models for each Zendesk source rather than one set of unioned models.*\n\nBy default, this package defines one single-connection source, called `zendesk`, which will be disabled if you are unioning multiple connections. This means that your DAG will not include your Zendesk sources, though the package will run successfully.\n\nTo properly incorporate all of your Zendesk connections into your project's DAG:\n1. Define each of your sources in a `.yml` file in your project. Utilize the following template for the `source`-level configurations, and, **most importantly**, copy and paste the table and column-level definitions from the package's `src_zendesk.yml` [file](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L15-L351).\n\n```yml\n# a .yml file in your root project\nsources:\n  - name: \u003cname\u003e # ex: Should match name in zendesk_sources\n    schema: \u003cschema_name\u003e\n    database: \u003cdatabase_name\u003e\n    loader: fivetran\n    loaded_at_field: _fivetran_synced\n\n    freshness: # feel free to adjust to your liking\n      warn_after: {count: 72, period: hour}\n      error_after: {count: 168, period: hour}\n\n    tables: # copy and paste from zendesk/models/staging/src_zendesk.yml - see https://support.atlassian.com/bitbucket-cloud/docs/yaml-anchors/ for how to use anchors to only do so once\n```\n\n\u003e **Note**: If there are source tables you do not have (see [Enable/Disable models](https://github.com/fivetran/dbt_zendesk?tab=readme-ov-file#enabledisable-models)), you may still include them, as long as you have set the right variables to `False`. Otherwise, you may remove them from your source definition.\n\n2. In the above `.yml` file, remove the `and var('zendesk_sources', []) == []` condition from the enabled config for the following source tables (if you have the tables in your schemas):\n- [`audit_log`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L20)\n- [`brand`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L115)\n- [`domain_name`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L135)\n- [`organization_tag`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L164)\n- [`organization`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L174)\n- [`user_tag`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L242)\n- [`schedule`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L295)\n- [`ticket_form_history`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L327)\n- [`schedule_holiday`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L406)\\\n- [`ticket_chat`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#424)\n- [`ticket_chat_event`](https://github.com/fivetran/dbt_zendesk/blob/main/models/staging/src_zendesk.yml#L458)\n\n3. Set the `has_defined_sources` variable (scoped to the `zendesk` package) to `True`, like such:\n```yml\n# dbt_project.yml\nvars:\n  zendesk:\n    has_defined_sources: true\n```\n\n### Enable/Disable models\n\n\u003e _This step is optional if you are unioning multiple connections 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._\n\nThis 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`, `brand`,`organization`, `organization_tag`, `ticket_form_history`, `ticket_chat`, `ticket_chat_event`, `sla_policy_metric_history`, or `ticket_sla_policy` features, and allows you to disable the corresponding functionality.\n\nBy default, all variables' values are assumed to be `true`, except for `using_audit_log` and `using_ticket_chat`. Add variables for only the tables you want to enable/disable:\n\n```yml\nvars:\n    using_ticket_chat:                  True          #Enable if you are using ticket_chat or ticket_chat_event\n    using_audit_log:                    True          #Enable if you are using audit_log for schedule and/or user_role histories\n    using_schedule_histories:           False         #Used in conjunction with using_audit_log. Set to false to disable schedule histories with audit_log.\n    using_user_role_histories:          False         #Used in conjunction with using_audit_log. Set to false to disable user_role histories with audit_log.\n    using_sla_policy_metric_history:    False         #Disable if you are using sla_policy_metric_history\n    using_ticket_sla_policy:            False         #Disable if you are using ticket_sla_policy\n    using_schedules:                    False         #Disable if you are not using schedules, which requires source tables ticket_schedule, daylight_time, and time_zone\n    using_holidays:                     False         #Disable if you are not using schedule_holidays for holidays\n    using_domain_names:                 False         #Disable if you are not using domain names\n    using_user_tags:                    False         #Disable if you are not using user tags\n    using_ticket_form_history:          False         #Disable if you are not using ticket form history\n    using_brands:                       False         #Disable if you are not using brands\n    using_organizations:                False         #Disable if you are not using organizations. Setting this to False will also disable organization tags.\n    using_organization_tags:            False         #Disable if you are not using organization tags\n```\n\n### (Optional) Additional configurations\n\u003cdetails open\u003e\u003csummary\u003eExpand/Collapse details\u003c/summary\u003e\n\n#### Enabling the unstructured document model for NLP\nThis package includes the `zendesk__document` model, which processes and segments Zendesk text data for vectorization, making it suitable for NLP workflows. The model outputs structured chunks of text with associated document IDs, segment indices, and token counts. For definitions and more information, refer to [zendesk__document](https://fivetran.github.io/dbt_zendesk/#!/model/model.zendesk.zendesk__document) in our dbt docs.\n\nBy default, this model is disabled. To enable it, update the `zendesk__unstructured_enabled` variable to true in your dbt_project.yml:\n\n```yml\nvars:\n  zendesk__unstructured_enabled: true # false by default.\n```\n\n##### Customizing Chunk Size for Vectorization\n\nThe `zendesk__document` model was developed to limit approximate chunk sizes to 5,000 tokens, optimized for OpenAI models. However, you can adjust this limit by setting the `max_tokens` variable in your `dbt_project.yml`:\n\n```yml\nvars:\n  zendesk_max_tokens: 5000 # Default value\n```\n\n### Add passthrough columns\nThis package includes all source columns defined in the macros folder. You can add more columns from the `TICKET`, `USER`, and `ORGANIZATION` tables using our pass-through column variables.\n\nThese variables allow for the pass-through fields to be aliased (`alias`) and casted (`transform_sql`) if desired, but not required. Datatype casting is configured via a sql snippet within the `transform_sql` key. You may add the desired sql while omitting the `as field_name` at the end and your custom pass-through fields will be casted accordingly. Use the below format for declaring the respective pass-through variables:\n\n```yml\nvars:\n  zendesk__ticket_passthrough_columns:\n    - name: \"account_custom_field_1\" # required\n      alias: \"account_1\" # optional\n      transform_sql: \"cast(account_1 as string)\" # optional, must reference the alias if an alias is provided (otherwise the original name)\n    - name: \"account_custom_field_2\"\n      transform_sql: \"cast(account_custom_field_2 as string)\"\n    - name: \"account_custom_field_3\"\n  zendesk__user_passthrough_columns:\n    - name: \"internal_app_id_c\"\n      alias: \"app_id\"\n  zendesk__organization_passthrough_columns:\n    - name: \"custom_org_field_1\"\n```\n\n\u003e Note: Earlier versions of this package employed a more rudimentary format for passthrough columns, in which the user provided a list of field names to pass in, rather than a mapping. In the above `ticket` example, this would be `[account_custom_field_1, account_custom_field_2, account_custom_field_3]`.\n\u003e\n\u003e This old format will still work, as our passthrough-column macros are all backwards compatible.\n\n#### Mark Custom User Roles as Agents\nIf 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 can skew historical ticket SLA metrics, since reply times and other calculations are based on `agent` or `admin` activity only.\n\nTo preserve the integrity of historical SLAs:\n- **If audit logs are NOT enabled** (var `using_audit_log` is false):  \n  Use the `internal_user_criteria` variable to define a SQL clause that identifies internal users based on fields in the `USER` table. This logic is applied via a `CASE WHEN` in the `stg_zendesk__user` model.\n\n- **If audit logs and user role history ARE enabled** (vars `using_audit_log` and `using_user_role_histories` are true):  \n  Historical user roles will be imported. You can further control which roles are treated as internal by using the same `internal_user_criteria` variable. It will be evaluated as a boolean (`TRUE`/`FALSE`) in the `is_internal_role` field of the `int_zendesk__user_role_history` model. Note that `agent` and `admin` roles are always treated as internal by default, and your custom logic will be applied in addition to this.\n\nThis configuration can also be used more broadly to classify what counts as an agent for any reporting or analytical use case. For more details, see the corresponding [DECISIONLOG](https://github.com/fivetran/dbt_zendesk/blob/main/DECISIONLOG.md#user-role-history) entry.\n\nExample usage:\n```yml\n# dbt_project.yml\nvars:\n  zendesk:\n    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\n```\n\n#### Tracking Ticket Field History Columns\nThe `zendesk__ticket_field_history` model generates historical data for the columns specified by the `ticket_field_history_columns` variable. By default, the columns tracked are `status`, `priority`, and `assignee_id`.  If you would like to change these columns, add the following configuration to your `dbt_project.yml` file. Additionally, the `zendesk__ticket_field_history` model allows for tracking the specified fields updater information through the use of the `zendesk_ticket_field_history_updater_columns` variable. The values passed through this variable are limited to the values shown within the config below. By default, the variable is empty and updater information is not tracked. If you would like to track field history updater information, add any of the below specified values to your `dbt_project.yml` file. After adding the columns to your root `dbt_project.yml` file, run the `dbt run --full-refresh` command to fully refresh any existing models.\n\n```yml\nvars:\n    ticket_field_history_columns: ['the','list','of','column','names']\n    ticket_field_history_updater_columns: [\n                                            'updater_user_id', 'updater_name', 'updater_role', 'updater_email', 'updater_external_id', 'updater_locale', \n                                            'updater_is_active', 'updater_user_tags', 'updater_last_login_at', 'updater_time_zone', \n                                            'updater_organization_id', 'updater_organization_domain_names' , 'updater_organization_organization_tags'\n                                            ]\n```\n*Note: This package only integrates the above ticket_field_history_updater_columns values. If you'd like to include additional updater fields, please create an [issue](https://github.com/fivetran/dbt_zendesk/issues) specifying which ones.*\n\n#### Extending and Limiting the Ticket Field History\nThis package will create a row in `zendesk__ticket_field_history` for each day that a ticket is open, starting at its creation date. A Zendesk Support ticket cannot be altered after being closed, so its field values will not change after this date. However, you may want to extend a ticket's history past its closure date for easier reporting and visualizing. To do so, add the following configuration to your root `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n\nvars:\n  zendesk:\n    ticket_field_history_extension_months: integer_number_of_months # default = 0 \n```\n\nConversely, you may want to only track the past X years of ticket field history. This could be for cost reasons, or because you have a BigQuery destination and have over 4,000 days (10-11 years) of data, leading to a `too many partitions` error in the package's incremental models. To limit the ticket field history to the most recent X years, add the following configuration to your root `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\n\nvars:\n  zendesk:\n    ticket_field_history_timeframe_years: integer_number_of_years # default = 50 (everything)\n```\n\n#### Configuring Maximum Ticket Length\nBy default, this package assumes that tickets will not remain open for longer than 52 weeks (1 year). This assumption is used in business hour calculations and SLA policy computations to generate the appropriate number of week intervals for time-based calculations.\n\nIf your organization has tickets that may remain open longer than 52 weeks, you may adjust this limit by configuring the `max_ticket_length_weeks` variable in your root `dbt_project.yml` file:\n\n```yml\n# dbt_project.yml\nvars:\n  zendesk:\n    max_ticket_length_weeks: 208 # Integer value: Ensure this is \u003e= the longest period a ticket was open (in weeks). Default = 52 weeks (1 year)\n```\n\n#### Changing the Build Schema\nBy default this package will build the Zendesk Support staging models within a schema titled (\u003ctarget_schema\u003e + `_zendesk_source`), the Zendesk Support intermediate models within a schema titled (\u003ctarget_schema\u003e + `_zendesk_intermediate`), and the Zendesk Support final models within a schema titled (\u003ctarget_schema\u003e + `_zendesk`) in your target database. If this is not where you would like your modeled Zendesk Support data to be written to, add the following configuration to your root `dbt_project.yml` file:\n\n```yml\nmodels:\n    zendesk:\n      +schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.\n      intermediate:\n        +schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.\n      staging:\n        +schema: my_new_schema_name # Leave +schema: blank to use the default target_schema.\n```\n\n#### Change the source table references\nIf an individual source table has a different name than the package expects, add the table name as it appears in your destination to the respective variable:\n\n\u003e IMPORTANT: See this project's [`dbt_project.yml`](https://github.com/fivetran/dbt_zendesk/blob/main/dbt_project.yml) variable declarations to see the expected names.\n\n```yml\nvars:\n    zendesk_\u003cdefault_source_table_name\u003e_identifier: your_table_name \n```\n\n\u003c/details\u003e\n\n### (Optional) Orchestrate your models with Fivetran Transformations for dbt Core™\n\u003cdetails\u003e\u003csummary\u003eExpand for details\u003c/summary\u003e\n\u003cbr\u003e\n\nFivetran offers the ability for you to orchestrate your dbt project through [Fivetran Transformations for dbt Core™](https://fivetran.com/docs/transformations/dbt#transformationsfordbtcore). Learn how to set up your project for orchestration through Fivetran in our [Transformations for dbt Core setup guides](https://fivetran.com/docs/transformations/dbt/setup-guide#transformationsfordbtcoresetupguide).\n\u003c/details\u003e\n\n## Does this package have dependencies?\nThis dbt package is dependent on the following dbt packages. These dependencies are installed by default within this package. For more information on the following packages, refer to the [dbt hub](https://hub.getdbt.com/) site.\n\u003e IMPORTANT: If you have any of these dependent packages in your own `packages.yml` file, we highly recommend that you remove them from your root `packages.yml` to avoid package version conflicts.\n\n```yml\npackages:\n    - package: fivetran/fivetran_utils\n      version: [\"\u003e=0.4.0\", \"\u003c0.5.0\"]\n\n    - package: dbt-labs/dbt_utils\n      version: [\"\u003e=1.0.0\", \"\u003c2.0.0\"]\n\n    - package: dbt-labs/spark_utils\n      version: [\"\u003e=0.3.0\", \"\u003c0.4.0\"]\n```\n\n\u003c!--section=\"zendesk_maintenance\"--\u003e\n## How is this package maintained and can I contribute?\n\n### Package Maintenance\nThe Fivetran team maintaining this package only maintains the [latest version](https://hub.getdbt.com/fivetran/zendesk/latest/) of the package. We highly recommend you stay consistent with the latest version of the package and refer to the [CHANGELOG](https://github.com/fivetran/dbt_zendesk/blob/main/CHANGELOG.md) and release notes for more information on changes across versions.\n\n### Contributions\nA small team of analytics engineers at Fivetran develops these dbt packages. However, the packages are made better by community contributions.\n\nWe highly encourage and welcome contributions to this package. Learn how to contribute to a package in dbt's [Contributing to an external dbt package article](https://discourse.getdbt.com/t/contributing-to-a-dbt-package/657).\n\n### Opinionated Modelling Decisions\nThis dbt package takes an opinionated stance on how business time metrics are calculated. The dbt package takes **all** schedules into account when calculating the business time duration. Whereas, the Zendesk Support UI logic takes into account **only** the latest schedule assigned to the ticket. If you would like a deeper explanation of the logic used by default in the dbt package you may reference the [DECISIONLOG](https://github.com/fivetran/dbt_zendesk/blob/main/DECISIONLOG.md).\n\n\u003c!--section-end--\u003e\n\n## Are there any resources available?\n- If you have questions or want to reach out for help, see the [GitHub Issue](https://github.com/fivetran/dbt_zendesk/issues/new/choose) section to find the right avenue of support for you.\n- If you would like to provide feedback to the dbt package team at Fivetran or would like to request a new dbt package, fill out our [Feedback Form](https://www.surveymonkey.com/r/DQ7K7WW).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_zendesk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffivetran%2Fdbt_zendesk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffivetran%2Fdbt_zendesk/lists"}