-- Fetch all the Contacts belonging to the HubSpot
-- account of a particular user.
SELECT *
FROM fiber.hubspot_contact
WHERE account_id = '{user.hubspot_id}'
-- Fetch all the Contacts belonging to the HubSpot
-- account of a particular user.
SELECT *
FROM fiber.hubspot_contact
WHERE account_id = '{user.hubspot_id}'
Code
CREATE TABLE fiber.hubspot_contact (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
completed_at TEXT,
requested_at TEXT,
started_at TEXT,
links JSONB,
results JSONB
)
CREATE TABLE fiber.hubspot_contact (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
completed_at TEXT,
requested_at TEXT,
started_at TEXT,
links JSONB,
results JSONB
)
Model definition