From 6bb1cdcd6160975838dd342e2ac9f1fbcb24df40 Mon Sep 17 00:00:00 2001 From: Jamie Rodriguez <65564846+fivetran-jamie@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:26:26 -0700 Subject: [PATCH] doc twweaks --- CHANGELOG.md | 6 +++--- README.md | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 26b642e..33fafdc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,9 +4,9 @@ ## Feature Updates - Adds passthrough column support for `USER` and `ORGANIZATION`. - - Using the new `zendesk__user_passthrough_columns` and `zendesk__organizations_passthrough_columns` variables, you can include custom columns from these source tables in their respective staging models. See [README](https://github.com/fivetran/dbt_zendesk_source?tab=readme-ov-file#add-passthrough-columns) for more details on how to configure. -- Also updated the format of the pre-existing `TICKET` passthrough column variable, `zendesk__ticket_passthrough_columns`. - - Previously, you could only provide a list of custom fields to be included in `stg_zendesk__ticket`. Now, you can provide an `alias` and `transform_sql` clause to be applied to each field (see [README](https://github.com/fivetran/dbt_zendesk_source?tab=readme-ov-file#add-passthrough-columns) for more details). + - Using the new `zendesk__user_passthrough_columns` and `zendesk__organization_passthrough_columns` variables, you can include custom columns from these source tables in their respective staging models. See [README](https://github.com/fivetran/dbt_zendesk_source?tab=readme-ov-file#add-passthrough-columns) for more details on how to configure. +- Also updated the format of the pre-existing `TICKET` passthrough column variable, `zendesk__ticket_passthrough_columns`, to align with the newly added passthrough variables delineated above. + - Previously, you could only provide a list of custom fields to be included in `stg_zendesk__ticket`. Now, you have the option to provide an `alias` and `transform_sql` clause to be applied to each field (see [README](https://github.com/fivetran/dbt_zendesk_source?tab=readme-ov-file#add-passthrough-columns) for more details). - **Note**: the package is and will continue to be backwards compatible with the old list-format. # dbt_zendesk_source v0.11.1 diff --git a/README.md b/README.md index 7e54f23..9b8bb35 100644 --- a/README.md +++ b/README.md @@ -69,13 +69,16 @@ vars:
Collapse/Expand configurations ### Add passthrough columns -This 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, which will persist these custom fields to the `stg_zendesk__ticket`, `stg_zendesk__user`, and `stg_zendesk__organization` models, repsectively. These 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-though fields will be casted accordingly. Use the below format for declaring the respective pass-through variables: +This 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, which will persist these custom fields to the `stg_zendesk__ticket`, `stg_zendesk__user`, and `stg_zendesk__organization` models, respectively. + +These 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: + ```yml vars: zendesk__ticket_passthrough_columns: - name: "account_custom_field_1" # required alias: "account_1" # optional - transform_sql: "cast(account_1 as string)" # optional, must reference the alias (if provided) + transform_sql: "cast(account_1 as string)" # optional, must reference the alias if an alias is provided (otherwise the original name) - name: "account_custom_field_2" transform_sql: "cast(account_custom_field_2 as string)" - name: "account_custom_field_3"