fivetran/dbt_zendesk_source

Pass-through columns for custom fields

Closed this issue · 4 comments

Is there an existing feature request for this?

  • I have searched the existing issues

Describe the Feature

I would like to be able to have custom fields pass through to the tickets table the same way the Asana dbt package does. I want the downstream tables to be able to leverage custom fields that we use routinely in our zendesk workflow.

Frankly, I would love it if this feature were enabled across all of the packages I use (zendesk, jira, etc).

Describe alternatives you've considered

I'm new to dbt so the only alternative I can imagine would be to do ANOTHER join after the enriched table is already built BACK to the original raw table where the custom fields exist. That seems antithetical to the dbt paradigm.

Are you interested in contributing this feature?

  • Yes.
  • Yes, but I will need assistance and will schedule time during your office hours for guidance.
  • No.

Anything else?

No response

Hi @Robert1er I think this is a great idea to include within the package! Thank you for proposing this feature and raising the need to our team.

I imagine the only table we would be adding passthrough columns for with this feature would be to the ticket tables. Are there any other source tables you would see passthrough columns being useful within?

I also noticed you mentioned you were open to creating a PR to integrate this feature. Let me know if you would like any assistance, or feel free to schedule time via the link and we can chat more about next steps. Otherwise, this is something I imagine my team would pick up in our next sprint (starting Thursday of next week).

Hi @Robert1er 👋 and happy Friday!

I wanted to send a quick note that I was able to get a working version of the package in place that incorporates this feature! If you would like to test the feature out before we release the update, you may do so using the below config in your packages.yml:

##packages.yml
packages:
  - git: https://github.com/fivetran/dbt_zendesk.git
    revision: feature/passthrough-addition
    warn-unpinned: false

To then add your passthrough columns into the final models, you can use the below variable in your dbt_project.yml:

##dbt_project.yml
vars:
  zendesk__ticket_passthrough_columns: ['custom_field_1','custom_field_2']

Let me know if you are able to get your custom fields included in the final models with this working branch. Thanks!

@Robert1er this is now live in the latest release of the package! You should see the latest version live on the hub at the top of the hour.

Thanks for the Feature Request and feel free to open any other FRs if you would like more features!

Question on this, say I have a custom field like so:

Field Name: Foo
Field ID: 12345

How should I structure it in vars?

I tried this and it failed:

##dbt_project.yml
vars:
  zendesk__ticket_passthrough_columns: [Foo]

I got the message:
Unrecognized name: Foo at [415:9]
compiled Code at zendesk_source/models/stg_zendesk__ticket.sql