-- 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,
email TEXT,
firstname TEXT,
lastname TEXT,
phone TEXT,
company TEXT,
website TEXT,
lifecyclestage TEXT
)
CREATE TABLE fiber.hubspot_contact (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
email TEXT,
firstname TEXT,
lastname TEXT,
phone TEXT,
company TEXT,
website TEXT,
lifecyclestage TEXT
)
Model definition