INTEGRATION · BIGQUERY
Product analytics on your BigQuery dataset.
Klaritics deploys inside your GCP project and queries BigQuery directly. BigQuery's serverless Dremel engine and Colossus storage means a single query can fan out across thousands of slots — and Klaritics is designed to take advantage of that.
How Klaritics queries BigQuery
Klaritics connects to your BigQuery dataset via a Google Cloud service account with `roles/bigquery.dataViewer` and `roles/bigquery.jobUser`. Queries from the Klaritics UI compile into standard SQL and execute through BigQuery's Dremel engine, which dynamically allocates slots — leaf nodes that read columnar Capacitor files from Colossus storage.
If you're on on-demand pricing, BigQuery automatically allocates slots per query. If you're on slot-based pricing (BigQuery Editions or reservations), you can assign a dedicated reservation to Klaritics' service account so its workload doesn't compete with your ELT or BI jobs.
Why teams pair Klaritics with BigQuery
01
GA4 export is built for this
Most teams already export Google Analytics 4 events into BigQuery via the native daily export. Klaritics maps directly onto the GA4 schema (`events_*` tables, `user_pseudo_id`, `event_params`) with zero re-instrumentation.
02
Dremel's parallelism is your superpower
BigQuery can dispatch thousands of slots per query, so even billions of events get scanned in seconds. Funnel and retention queries that crawl on row-store databases run in seconds here.
03
Partitioning + clustering = predictable cost
BigQuery's date-partitioned tables and clustered columns mean Klaritics' time-bounded queries scan only the relevant partitions. Combined with on-demand pricing's per-byte billing, this makes cost forecasting straightforward.
Where it shines (and where it does not)
Where it shines
- GA4 / Firebase event analytics (perfect schema fit)
- Petabyte-scale historical analyses
- Teams already on BigQuery for marketing or ad analytics
- Cost predictability via partition pruning + reservation pricing
Where it does not
- Sub-second interactive dashboards under high concurrency (BigQuery's slot allocation has cold-start overhead). For embedded customer-facing analytics, consider ClickHouse.
- Very small workloads (<100 GB total) — BigQuery's per-query overhead can make ClickHouse or Postgres a cheaper choice at this scale.
- High-frequency point lookups (BigQuery is OLAP, not OLTP).
Getting started
Step 1
Step 1 — Create a service account
gcloud iam service-accounts create klaritics-reader \
--display-name="Klaritics warehouse-native reader"Step 2
Step 2 — Grant read access to your dataset
gcloud projects add-iam-policy-binding YOUR_PROJECT \
--member="serviceAccount:klaritics-reader@YOUR_PROJECT.iam.gserviceaccount.com" \
--role="roles/bigquery.dataViewer"
gcloud projects add-iam-policy-binding YOUR_PROJECT \
--member="serviceAccount:klaritics-reader@YOUR_PROJECT.iam.gserviceaccount.com" \
--role="roles/bigquery.jobUser"Step 3
Step 3 — Generate a service account key (or use Workload Identity Federation — recommended)
gcloud iam service-accounts keys create ./klaritics-key.json \
--iam-account=klaritics-reader@YOUR_PROJECT.iam.gserviceaccount.comStep 4
Step 4 — Connect from Klaritics admin UI
Settings → Warehouses → Add BigQuery → upload the key file (or paste OIDC config)Sample query: 7-day signup-to-activation funnel on GA4 schema
WITH step_1 AS (
SELECT user_pseudo_id, TIMESTAMP_MICROS(event_timestamp) AS step_1_time
FROM `your-project.analytics_*.events_*`
WHERE event_name = 'sign_up'
AND _TABLE_SUFFIX BETWEEN FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY))
AND FORMAT_DATE('%Y%m%d', CURRENT_DATE())
),
step_2 AS (
SELECT s1.user_pseudo_id,
MIN(TIMESTAMP_MICROS(t.event_timestamp)) AS step_2_time
FROM step_1 s1
JOIN `your-project.analytics_*.events_*` t
ON t.user_pseudo_id = s1.user_pseudo_id
AND t.event_name = 'activated'
AND TIMESTAMP_MICROS(t.event_timestamp) BETWEEN s1.step_1_time
AND TIMESTAMP_ADD(s1.step_1_time, INTERVAL 7 DAY)
GROUP BY s1.user_pseudo_id
)
SELECT
COUNT(DISTINCT s1.user_pseudo_id) AS signed_up,
COUNT(DISTINCT s2.user_pseudo_id) AS activated,
SAFE_DIVIDE(COUNT(DISTINCT s2.user_pseudo_id), COUNT(DISTINCT s1.user_pseudo_id)) AS conversion_rate
FROM step_1 s1
LEFT JOIN step_2 s2 ON s1.user_pseudo_id = s2.user_pseudo_id;Security and compliance
- Service account requires `bigquery.dataViewer` and `bigquery.jobUser` only.
- Workload Identity Federation supported (recommended over JSON key files).
- All connections use Google's TLS — never plaintext.
- VPC Service Controls supported: confine BigQuery access to trusted networks including your Klaritics deployment.
- Klaritics writes nothing to BigQuery; it's read-only by design.