daniel
09/13/2023, 4:18 PMdaniel
09/13/2023, 6:18 PMusers.user_fields
object (docs)edgar_ramirez_mondragon
09/13/2023, 6:49 PMdaniel
09/13/2023, 6:58 PMusers.user_fields.{custom_field_name}
but this seems to result in nothing being selected for that field, is there some other way in Meltano to index into nested objects using select
?daniel
09/13/2023, 6:59 PMuser_fields
objectedgar_ramirez_mondragon
09/13/2023, 7:01 PMmeltano select tap-zendesk --list --all
? Is the subfield selected?jan_soubusta
09/13/2023, 7:10 PMselect:
- sla_policies.created_at
- sla_policies.description
- sla_policies.filter
- sla_policies.filter.all
- sla_policies.filter.any
- ticket_comments.attachments
- ticket_metrics.agent_wait_time_in_minutes
- ticket_metrics.agent_wait_time_in_minutes.business
- ticket_metrics.agent_wait_time_in_minutes.calendar
jan_soubusta
09/13/2023, 7:11 PMdaniel
09/13/2023, 7:25 PMmeltano select tap-zendesk --list --all
...
[selected ] users.user_fields.user_role
...
[selected ] organizations.organization_fields.back_office_account_uuid
...
select list from Meltano YAML:
select:
- organizations.organization_fields.back_office_account_uuid
- users.user_fields.user_role
however neither shows in the output when running meltano elt tap-zendesk target-jsonl
, for example:
{"id": 18431587202459, "updated_at": "2023-09-01T00:01:24.000000Z"}
{"id": 18431665953307, "updated_at": "2023-09-01T00:03:23.000000Z"}
{"id": 18328316385563, "updated_at": "2023-09-01T00:04:53.000000Z"}
...
edgar_ramirez_mondragon
09/13/2023, 9:24 PMmeltano invoke --dump=catalog tap-zendesk > catalog.json
2. Edit the file manually to add metadata entries:
{
"breadcrumb": [
"properties",
"user_fields"
],
"metadata": {
"inclusion": "available",
"selected": true
}
},
{
"breadcrumb": [
"properties",
"user_fields",
"properties",
"test_pii_field"
],
"metadata": {
"inclusion": "available",
"selected": false
}
},
{
"breadcrumb": [
"properties",
"user_fields",
"properties",
"test_custom_field"
],
"metadata": {
"inclusion": "available",
"selected": true
}
},
3. Use the custom catalog:
plugins:
extractors:
- name: tap-zendesk
catalog: catalog.json
edgar_ramirez_mondragon
09/13/2023, 11:01 PMplugins:
extractors:
- name: tap-zendesk
select:
- "users" # select the stream
- "users.user_fields" # select the field
- "users.user_fields.*" # select all subfields
- "!users.user_fields.field_you_dont_want" # deselect each unwanted fields
schema:
users:
user_fields:
type: object
properties:
field_you_want:
type: [string, "null"]
field_you_dont_want:
type: [string, "null"]
jan_soubusta
09/14/2023, 3:32 PMdaniel
09/14/2023, 7:39 PMuser_fields
object, so that fields we don't specify will be ignored? if so, it seems we could do that and then select the entire objectedgar_ramirez_mondragon
09/14/2023, 8:04 PMwill this override the entire schema for theDon't know at the moment, but it's worth trying!object, so that fields we don't specify will be ignored? if so, it seems we could do that and then select the entire objectuser_fields
daniel
09/14/2023, 8:17 PMdaniel
10/04/2023, 3:02 PMcustom_fields
array from the Zendesk Tickets API (we'll have to filter based on the id
attribute):
• https://developer.zendesk.com/documentation/ticketing/managing-tickets/creating-and-updating-tickets/#setting-custom-field-values
• https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
cc @edgar_ramirez_mondragon @jan_soubustajan_soubusta
10/04/2023, 7:41 PMdaniel
10/04/2023, 9:44 PMedgar_ramirez_mondragon
10/04/2023, 10:20 PM