fivetran / dbt_zendesk_source Goto Github PK
View Code? Open in Web Editor NEWFivetran's Zendesk Support source dbt package
Home Page: https://fivetran.github.io/dbt_zendesk_source/#!/overview
License: Apache License 2.0
Fivetran's Zendesk Support source dbt package
Home Page: https://fivetran.github.io/dbt_zendesk_source/#!/overview
License: Apache License 2.0
Similar to issue fivetran/dbt_hubspot_source#116, we will also want to update this package's tmp models to use select {{ dbt_utils.star(...) }}
instead of select *
.
No response
No response
Our fivetran_utils collect_freshness
macro was designed to override dbt's equivalent macro to allow for the enabling/disabling of variables when running dbt source snapshot-freshness
. Thus if a source table does not exist, dbt will not run (and error on) a freshness test on the table.
dbt has since updated its macro in recent versions to basically provide the same functionality. So warnings are being thrown to upgrade the package logic.
We will want to modify all versions of the meta: is_enabled
config in our src_zendesk.yml
package (example here) to match the config: enabled
dbt logic. Once those dependencies are either updated or removed, we can further explore updates to our own internal collect_freshness
macro.
At the moment, we will be proceeding forward with updating dbt_fivetran_utils
to match the logic of dbt's collect_freshness
macro. That way customers will no longer experience that warning.
More details can be found in this ticket.
Customers raising this issue can be found in this dbt slack thread https://getdbt.slack.com/archives/C03SAHKKG2Z/p1683127164993329
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).
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.
No response
Currently links to a deprecated version
Are you a current Fivetran customer?
Mark MacArdle, Bought by Many
Describe the bug
An order by in the stg_zendesk__ticket_field_history
model is causing a resources exceeded error in bigquery
Steps to reproduce
Expected behavior
Project variables configuration
copy dbt_project.yml here
Package Version
packages:
- package: fishtown-analytics/dbt_utils
version: 0.6.4 # dbt recommend pinning all packages, `*` doesn't work.
# will also import fivetran/zendesk_source as a dependency
- package: fivetran/zendesk
version: 0.4.1
Warehouse
Additional context
Screenshots
Please indicate the level of urgency
Low
Are you interested in contributing to this package?
Are you a current Fivetran customer?
Jon Wu, Architect, Paper Culture
Describe the bug
When ticket form history isn't being used, freshness is still checked and subsequently causes an error. It should be ignored.
Steps to reproduce
dbt_project.yml
disable form history with using_ticket_form_history: False
. In addition, don't select this table for sync in Fivetran so that it doesn't exist.dbt source snapshot-freshness
ERROR freshness of zendesk.ticket_form_history
followed by info saying that the table doesn't exist. For example, something like this for BigQuery:Runtime Error in source ticket_form_history (models/src_zendesk.yml)
404 GET https://bigquery.googleapis.com/bigquery/v2/projects/[project]/queries/[query-id]?maxResults=0&location=US&prettyPrint=false: Not found: Table [project]:zendesk.ticket_form_history was not found in location US
Expected behavior
When you set using_ticket_form_history: False
, freshness shouldn't be checked. Ideally the source isn't even defined so that it doesn't appear in the docs.
Project variables configuration
name: [project-name]
version: 1.0.0
config-version: 2
profile: default
source-paths: [models]
analysis-paths: [analysis]
test-paths: [tests]
data-paths: [data]
macro-paths: [macros]
snapshot-paths: [snapshots]
target-path: target
clean-targets:
- target
- dbt_modules
vars:
zendesk_source:
zendesk_database: [project]
# Disable models for Zendesk features we aren't using or syncing
using_ticket_form_history: False
using_schedules: False
Package Version
packages:
- package: fishtown-analytics/dbt_utils
version: 0.6.6
- package: fivetran/ad_reporting
version: 0.2.2
- package: fivetran/facebook_ads
version: 0.2.1
- package: fivetran/google_ads
version: 0.2.1
- package: fivetran/marketo
version: 0.4.0
- package: fivetran/microsoft_ads
version: 0.2.1
- package: fivetran/pinterest
version: 0.3.2
- package: fivetran/zendesk
version: 0.5.1
Warehouse
Additional context
Similar to fivetran/dbt_hubspot#41
Screenshots
Please indicate the level of urgency
Testing for the first time, but given that this was fixed in another package, it seems like a fix is known.
Are you interested in contributing to this package?
Zendesk now supports custom statuses for tickets. The zendesk_source package should support this and have appropriate staging models for the same.
No response
No response
Hi team!
We added this package to our dbt project and disabled user_tags
as we don't have this enabled on our account and this table doesn't exist in our warehouse (see configuration below)
However, it looks like in the src_zendesk.yml
file, the user_tag
table is still being counted when we run a dbt source snapshot-freshness
command.
We were able to solve this issue by explicitly disabling user_tags
in a source
configuration block (see image below), but figured I'd bring this to your attention :)
Looks like the staging models are a bit out of date with what fields fivetran actually replicates from Zendesk. This is just one I've noticed that would be helpful, but there are others.
No response
No response
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
Unrecognized name: Foo at [415:9]
compiled Code at zendesk_source/models/stg_zendesk__ticket.sql
The custom field to be picked up by dbt models
name: 'data_dbt'
version: '1.3.0'
config-version: 2
model-paths: ["models"]
analysis-paths: ["analysis"]
test-paths: ["tests"]
seed-paths: ["seeds"]
macro-paths: ["macros"]
snapshot-paths: ["snapshots"]
target-path: "target" # directory which will store compiled SQL files
clean-targets: # directories to be removed by dbt clean
vars:
quickbooks_schema: landing_quickbooks
stripe_schema: landing_stripe
stripe__using_credit_notes: True
zendesk_schema: landing_zendesk
using_domain_names: False
using_organization_tags: False
# zendesk__ticket_passthrough_columns: [Inquiry]
packages:
bigquery
1.3.0
None
Currently, source configurations for database and schema names can only be set through project variables, which are not very dynamic.
I would like to use the same dbt_project.yml
across environments that have different source databases, but project vars are not Jinja rendered, like most other configuration sections. The only mechanism for overriding projects vars is with the --vars
command line option. While this would work, I'd like to avoid it because it complicates calling dbt for developers and in our deployments. In addition, using env vars is already a pattern that's supported in setting the database
value in sources
, and so I'd like to be able to do the same with dbt_zendesk_source
.
There's a lot of discussion about how to make vars
more configurable on the dbt-core Githib, but nothing has been decided yet.
No response
No response
I am using snowflake. I am using dbt packeage (zendesk).
I have a table here called "Group". The "Group" has to be enclosed in double-cotations. Because that's a Snowflake specification.
However, dbt automatically adds a single quote and I get an error.
This is the error.
Database Error in model stg_zendesk_group (models/stg_zendesk_group.sql)
001003 (42000): SQL compilation error:
syntax error line 5 at position 43 unexpected 'group'.
syntax error line 7 at position 0 unexpected ')'.
compiled SQL at target/run/zendesk_source/models/stg_zendesk_group.sql
Adding double quotes on the model side results in an error because when you "dbt run", dbt encloses it in a single coat.
I would like to know the specific code that can solve this problem.
Same as an issue I raised in the stripe package here.
If the requirements could be updated to allow dbt v0.19 that'd be great.
Are you a current Fivetran customer?
Jon Wu, Architect, Paper Culture
Describe the bug
zendesk.organization_tag
fails freshness checks. It appears that it shouldn't be checked.
Steps to reproduce
dbt source snapshot-freshness
ERROR STALE freshness of zendesk.organization_tag
Expected behavior
No freshness error should occur if data sync is working. In my case, it appears that this data just doesn't get updated very often. I noticed that freshness: null
is configured for zendesk.organization
. Should that just be copied to organization_tag
to ignore freshness here too?
Project variables configuration
name: [project-name]
version: 1.0.0
config-version: 2
profile: default
source-paths: [models]
analysis-paths: [analysis]
test-paths: [tests]
data-paths: [data]
macro-paths: [macros]
snapshot-paths: [snapshots]
target-path: target
clean-targets:
- target
- dbt_modules
vars:
zendesk_source:
zendesk_database: [project]
# Disable models for Zendesk features we aren't using or syncing
using_ticket_form_history: False
using_schedules: False
Package Version
packages:
- package: fishtown-analytics/dbt_utils
version: 0.6.6
- package: fivetran/ad_reporting
version: 0.2.2
- package: fivetran/facebook_ads
version: 0.2.1
- package: fivetran/google_ads
version: 0.2.1
- package: fivetran/marketo
version: 0.4.0
- package: fivetran/microsoft_ads
version: 0.2.1
- package: fivetran/pinterest
version: 0.3.2
- package: fivetran/zendesk
version: 0.5.1
Warehouse
Additional context
Freshness is ignored for organization
: https://github.com/fivetran/dbt_zendesk_source/blob/master/models/src_zendesk.yml#L130
Screenshots
Please indicate the level of urgency
Testing for the first time, but hopefully this is a simple fix.
Are you interested in contributing to this package?
The metrics 'total_agent_replies' and 'count_agent_comments' in the zendesk__ticket_metrics model are incorrect when compared with what Zendesk uses for their analytics. It looks like the metrics in the Fivetran model ignores "agent comments" from users who were agents at the time the comment was left on a ticket, but who no longer are agents (if they left the business).
In my view these should still be counted as 'agent comments', and this is how Zendesk treats them in their own analytics tool. Otherwise, this makes historical analysis incorrect as these metrics will be skewed based on whether a historical ticket was handled by someone who is still an agent today, or by someone who has left the business and therefore no longer an agent.
No response
In my view the metrics should count comments made by ex-agents who were agents at the time of the comment. Zendesk is able to provide this detail through their Data API endpoints we received through our previous data movement platform so I assume there must be an audit trail somewhere in the schema to track when users changed roles.
Running the Fivetran dbt transformations as they come
snowflake
Running on the latest dbt version 1.7
No response
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.