-- Fetch all the Reports belonging to the Google
-- Analytics account of a particular user.
SELECT *
FROM fiber.google_analytics_report
WHERE account_id = '{user.google_analytics_id}'
-- Fetch all the Reports belonging to the Google
-- Analytics account of a particular user.
SELECT *
FROM fiber.google_analytics_report
WHERE account_id = '{user.google_analytics_id}'
Code
CREATE TABLE fiber.google_analytics_report (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
view_id TEXT,
date_ranges JSONB,
sampling_level TEXT,
dimensions JSONB,
dimension_filter_clauses JSONB,
metrics JSONB,
metric_filter_clauses JSONB,
filters_expression TEXT,
order_bys JSONB,
segments JSONB,
pivots JSONB,
cohort_group JSONB,
page_token TEXT
)
CREATE TABLE fiber.google_analytics_report (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
view_id TEXT,
date_ranges JSONB,
sampling_level TEXT,
dimensions JSONB,
dimension_filter_clauses JSONB,
metrics JSONB,
metric_filter_clauses JSONB,
filters_expression TEXT,
order_bys JSONB,
segments JSONB,
pivots JSONB,
cohort_group JSONB,
page_token TEXT
)
Model definition