-- Fetch all the Campaigns belonging to the Meta Ads
-- account of a particular user.
SELECT *
FROM fiber.meta_ads_campaign
WHERE account_id = '{user.meta_ads_id}'
-- Fetch all the Campaigns belonging to the Meta Ads
-- account of a particular user.
SELECT *
FROM fiber.meta_ads_campaign
WHERE account_id = '{user.meta_ads_id}'
Code
CREATE TABLE fiber.meta_ads_campaign (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
account_id TEXT,
buying_type TEXT,
can_use_spend_cap BOOLEAN,
configured_status TEXT,
created_time TEXT,
effective_status TEXT,
is_skadnetwork_attribution BOOLEAN,
name TEXT,
objective TEXT,
start_time TEXT,
stop_time TEXT,
updated_time TEXT,
primary_attribution TEXT,
lifetime_budget TEXT,
source_campaign JSONB,
spend_cap TEXT,
topline_id TEXT
)
CREATE TABLE fiber.meta_ads_campaign (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
account_id TEXT,
buying_type TEXT,
can_use_spend_cap BOOLEAN,
configured_status TEXT,
created_time TEXT,
effective_status TEXT,
is_skadnetwork_attribution BOOLEAN,
name TEXT,
objective TEXT,
start_time TEXT,
stop_time TEXT,
updated_time TEXT,
primary_attribution TEXT,
lifetime_budget TEXT,
source_campaign JSONB,
spend_cap TEXT,
topline_id TEXT
)
Model definition