-- Fetch all the Tickets belonging to the Zendesk
-- account of a particular user.
SELECT *
FROM fiber.zendesk_ticket
WHERE account_id = '{user.zendesk_id}'
-- Fetch all the Tickets belonging to the Zendesk
-- account of a particular user.
SELECT *
FROM fiber.zendesk_ticket
WHERE account_id = '{user.zendesk_id}'
Code
CREATE TABLE fiber.zendesk_ticket (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
assignee_id TEXT,
collaborator_ids TEXT[],
custom_fields JSONB,
custom_status_id TEXT,
description TEXT,
due_at TIMESTAMP WITH TIME ZONE,
external_id TEXT,
follower_ids TEXT[],
from_messaging_channel BOOLEAN,
group_id TEXT,
has_incidents BOOLEAN,
organization_id TEXT,
priority TEXT,
problem_id TEXT,
raw_subject TEXT,
recipient TEXT,
requester_id TEXT,
satisfaction_rating JSONB,
sharing_agreement_ids TEXT[],
status TEXT,
subject TEXT,
submitter_id TEXT,
tags TEXT[],
type TEXT,
url TEXT,
via JSONB
)
CREATE TABLE fiber.zendesk_ticket (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
assignee_id TEXT,
collaborator_ids TEXT[],
custom_fields JSONB,
custom_status_id TEXT,
description TEXT,
due_at TIMESTAMP WITH TIME ZONE,
external_id TEXT,
follower_ids TEXT[],
from_messaging_channel BOOLEAN,
group_id TEXT,
has_incidents BOOLEAN,
organization_id TEXT,
priority TEXT,
problem_id TEXT,
raw_subject TEXT,
recipient TEXT,
requester_id TEXT,
satisfaction_rating JSONB,
sharing_agreement_ids TEXT[],
status TEXT,
subject TEXT,
submitter_id TEXT,
tags TEXT[],
type TEXT,
url TEXT,
via JSONB
)
Model definition