Skip to content
Skip to content
Klaritics

INTEGRATION · DATABRICKS

Product analytics on your Databricks lakehouse.

Klaritics deploys inside your network and queries Databricks SQL warehouses directly against Delta tables in Unity Catalog. The lakehouse pattern — transactional storage, open formats, and SQL/ML on one platform — is a natural fit for warehouse-native product analytics when your events already land in Delta.

Databricks logo
✅ GALatency (typical):<3s p50, <8s p95SQL engine:Databricks SQL + PhotonTable format:Delta Lake (recommended)Deployment:Self-hosted

How Klaritics queries Databricks

Klaritics connects to your workspace using a Databricks SQL warehouse (Serverless or Classic) and authenticates via OAuth (recommended), a service principal, or a personal access token scoped to the minimum privileges. Queries from the UI compile to Spark SQL / Databricks SQL and execute on the warehouse you designate — with Photon acceleration when enabled.

Under Unity Catalog, Klaritics needs only `USE CATALOG`, `USE SCHEMA`, and `SELECT` on the specific event tables (and `EXECUTE` on the warehouse if your org requires explicit warehouse grants). Funnels, retention, and cohorts translate to predicate-pushdown-friendly SQL over partitioned Delta files, so time-bounded scans stay efficient.

Klaritics deploymentAuthDatabricksAggregated results
Klaritics (your VPC) → OAuth or PAT → Databricks SQL warehouse → reads Delta tables via Unity Catalog → aggregated results to the UI.

Why teams pair Klaritics with Databricks

01

One copy of truth in Delta Lake

Delta Lake gives ACID transactions, schema evolution, and time travel on object storage. If your product events are already curated in Delta (dbt, Auto Loader, Spark streaming), Klaritics analyzes that same table — no export to a second warehouse.

02

Governance that data teams already trust

Unity Catalog centralizes permissions, lineage, and auditing. Klaritics inherits your existing grants: row filters, column masks, and group-based access carry through to the analytics UI.

03

SQL warehouses sized for analytics bursts

Databricks SQL warehouses auto-scale or suspend between dashboard sessions. You can run Klaritics on a small warehouse for exploration and a larger one for scheduled refreshes — similar isolation to other cloud warehouses, but on the lakehouse stack you already pay for.

Where it shines (and where it does not)

Where it shines

  • Teams standardized on Databricks for ELT, ML, and BI who want product analytics without another database
  • Event data in Delta (batch or streaming) with partition columns like `event_date` or `dt`
  • Environments that require Unity Catalog lineage and audit logs for all consumer queries
  • Hybrid workloads: same events power Klaritics, notebooks, and downstream models

Where it does not

  • Greenfield stacks with no Databricks footprint — the platform overhead (workspace, UC, SQL warehouses) only pays off if you're committed to the lakehouse.
  • Strict sub-second p99 embedded analytics at very high concurrency; a dedicated OLAP engine like ClickHouse can still be a better fit for that profile.
  • Heavily mutable OLTP-style event stores — Delta is optimized for append-mostly analytics; frequent row-level updates add operational cost.

Getting started

Step 1

Step 1 — Create a service principal (or dedicated user) for Klaritics

In Databricks: Identity and access → Service principals → Add.
Note the application ID; you'll use it for OAuth machine-to-machine auth (recommended) or issue a scoped personal access token for initial testing.

Step 2

Step 2 — Grant Unity Catalog privileges on your event tables

-- Replace catalog, schema, and principal name with yours.
GRANT USE CATALOG ON CATALOG main TO `klaritics_reader`;
GRANT USE SCHEMA ON SCHEMA main.analytics TO `klaritics_reader`;
GRANT SELECT ON TABLE main.analytics.events TO `klaritics_reader`;
GRANT CAN USE ON WAREHOUSE `klaritics_wh` TO `klaritics_reader`;

Step 3

Step 3 — Create or choose a SQL warehouse for Klaritics

SQL Warehouses → Create warehouse (Serverless or Classic).
Enable Photon if available.
Set auto-stop to suspend the warehouse when idle to control DBU usage.

Step 4

Step 4 — Connect from Klaritics admin UI

Settings → Warehouses → Add Databricks.
Provide workspace host (e.g. adb-1234567890.azuredatabricks.net), warehouse HTTP path, OAuth client credentials or PAT, and default catalog.schema.
Klaritics validates the connection and introspects Delta tables.

Sample query: 7-day signup-to-activation funnel (Delta table)

WITH step_1 AS (
  SELECT user_id, event_time AS step_1_time
  FROM main.analytics.events
  WHERE event_name = 'signup'
    AND event_time >= current_timestamp() - INTERVAL 30 DAYS
),
step_2 AS (
  SELECT s1.user_id,
         min(t.event_time) AS step_2_time
  FROM step_1 s1
  INNER JOIN main.analytics.events t
    ON t.user_id = s1.user_id
   AND t.event_name = 'activated'
   AND t.event_time BETWEEN s1.step_1_time
                        AND s1.step_1_time + INTERVAL 7 DAYS
  GROUP BY s1.user_id
)
SELECT
  count(DISTINCT s1.user_id) AS signed_up,
  count(DISTINCT s2.user_id) AS activated,
  count(DISTINCT s2.user_id) / nullif(count(DISTINCT s1.user_id), 0) AS conversion_rate
FROM step_1 s1
LEFT JOIN step_2 s2 ON s1.user_id = s2.user_id;

💡 If your Delta table is partitioned by `event_date`, filter on that column first — Klaritics' planner aligns funnel windows with partition pruning to minimize scanned files.

Security and compliance

  • Least privilege: `USE CATALOG` / `USE SCHEMA` / `SELECT` on named tables only; optional `CAN USE` on a single SQL warehouse.
  • Prefer OAuth with a service principal over long-lived personal access tokens; rotate PATs if you must use them.
  • Private connectivity: Databricks Private Link / VNet injection keeps traffic off the public internet; pair with Klaritics in the same trust boundary.
  • Unity Catalog row filters and column masks apply to Klaritics queries the same as any SQL client.
  • Audit: query history in Databricks System Tables (where enabled) attributes workload to the Klaritics identity for SOC2-style review.

FAQ

Stop moving data. Start analyzing it.

Connect your warehouse in 8 minutes. See your first funnel in under an hour.