IntegrationsData WarehousesDatabricks (SQL Warehouse)

Databricks (SQL Warehouse)

Datafly Signal writes events into a Databricks Delta Lake table using the SQL Statement Execution API, executed against a SQL warehouse. Pick this mode when you already have a running SQL warehouse and want batch-friendly inserts into Unity Catalog.

For lower-latency real-time ingestion, see Databricks (Zerobus Ingest), which bypasses SQL warehouses and writes directly via the Zerobus streaming API.

Why route Databricks (SQL Warehouse) through Datafly Signal

  • The data lands in infrastructure you own. Signal writes to your Databricks (SQL Warehouse) directly from your own deployment. Datafly operates no intermediary and never holds a copy of your event data.
  • Email is hashed on the way in. Signal normalises (trim and lowercase) and applies SHA-256 inside your own deployment, so the table holds hashed identifiers rather than raw personal data.
  • Client IP and user agent are recorded as event context. Both come from the original visitor request rather than from your server, so geography and device analysis done in the warehouse reflects the actual visitor.
  • Presets for Retail, Media & Publishing, B2B / SaaS and General. The mapping starts from a working configuration for your vertical instead of a blank field map.
  • One consent decision governs every destination. Databricks (SQL Warehouse) is gated by the same consent state as the rest of your stack, so a withdrawal applies everywhere at once.

Prerequisites

Before configuring this integration, you need a Databricks workspace with Unity Catalog, a SQL warehouse, a target table, and a personal access token (or service principal token).

Create a Databricks Workspace

  1. Sign up at databricks.com or provision a workspace through your cloud provider (AWS, Azure, or GCP).
  2. Complete the workspace setup wizard.
  3. Note the Workspace URL (e.g. https://abc-12345.cloud.databricks.com).

Create a SQL Warehouse

  1. In the Databricks workspace, go to SQL Warehouses in the left sidebar.
  2. Click Create SQL warehouse.
  3. Enter a name (e.g. datafly-warehouse).
  4. Choose the Size (2X-Small is sufficient for low to moderate event volume).
  5. Set Auto stop to manage cost.
  6. Click Create.
  7. Note the Warehouse ID from the warehouse details page (visible in the URL and under Connection details > HTTP path — the last segment).

Create a Catalog, Schema, and Table

In the SQL editor or a notebook, run:

CREATE CATALOG IF NOT EXISTS datafly;
CREATE SCHEMA IF NOT EXISTS datafly.events;
 
CREATE TABLE IF NOT EXISTS datafly.events.raw (
  message_id      STRING,
  event_type      STRING,
  event_name      STRING,
  anonymous_id    STRING,
  user_id         STRING,
  ip_address      STRING,
  user_agent      STRING,
  page_url        STRING,
  page_path       STRING,
  page_referrer   STRING,
  org_id          STRING,
  pipeline_id     STRING,
  event_timestamp TIMESTAMP,
  received_at     TIMESTAMP,
  properties_json STRING,
  context_json    STRING
);

This is the canonical Datafly warehouse schema — the same column set Signal writes to BigQuery, Snowflake, and Redshift, so a single DDL is portable across destinations. Every blueprint-mapped property is carried inside properties_json (queryable with Databricks JSON path), so you never have to alter the table when a blueprint changes. Databricks stores the table in Delta Lake format, providing ACID transactions, time travel, and schema evolution.

⚠️

Each event is delivered as one parameterised INSERT executed on the SQL warehouse. This is ideal for low-to-moderate volume and pilots, but high-volume streams generate many small Delta files and sustained warehouse cost — for those, use Databricks (Zerobus Ingest) or land events in object storage and ingest with Auto Loader.

Generate a Personal Access Token

  1. Click your profile icon (top right) > Settings.
  2. Go to Developer > Access tokens.
  3. Click Generate new token.
  4. Enter a Comment (e.g. Datafly Signal) and a Lifetime.
  5. Click Generate.
  6. Copy the token immediately — it is only shown once.
⚠️

For production deployments, prefer a service principal token over a personal access token. Grant the service principal USE CATALOG, USE SCHEMA, and MODIFY on the target table via Unity Catalog.

Configuration

FieldTypeRequiredDescription
workspace_urlstringYesWorkspace URL (e.g. https://abc-12345.cloud.databricks.com).
access_tokensecretYesPersonal access token or service principal token.
warehouse_idstringYesThe SQL warehouse ID to execute statements against.
catalogstringYesThe Unity Catalog name.
schemastringYesThe schema within the catalog.
tablestringYesThe target table name.

Signal Setup

Quick Setup

  1. Navigate to Integrations in the sidebar.
  2. Open the Integration Library tab.
  3. Find Databricks (SQL Warehouse) or filter by Warehouse.
  4. Click Install, select a variant if available, and fill in the required fields.
  5. Click Install Integration to create the integration with a ready-to-use default blueprint.

API Setup

curl -X POST http://localhost:8084/v1/admin/integration-catalog/databricks_sql/install \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Databricks (SQL Warehouse)",
    "variant": "default",
    "config": {
      "workspace_url": "https://abc-12345.cloud.databricks.com",
      "access_token": "dapi1234567890abcdef",
      "warehouse_id": "abc123def456",
      "catalog": "datafly",
      "schema": "events",
      "table": "raw"
    },
    "delivery_mode": "server_side"
  }'

Schema

Signal writes the canonical event envelope. Columns whose value is empty are omitted from the INSERT and take the table default (NULL):

ColumnDatabricks typeNotes
message_idSTRINGUnique per delivered event.
event_typeSTRINGtrack, page, identify, etc.
event_nameSTRINGEvent name (snake_case).
anonymous_idSTRINGFirst-party visitor identifier.
user_idSTRINGLogged-in user identifier (nullable).
ip_addressSTRINGClient IP (nullable).
user_agentSTRINGClient user agent (nullable).
page_urlSTRINGPage URL (nullable).
page_pathSTRINGPage path (nullable).
page_referrerSTRINGPage referrer (nullable).
org_idSTRINGDatafly org identifier.
pipeline_idSTRINGSignal pipeline identifier.
event_timestampTIMESTAMPClient event time.
received_atTIMESTAMPTime Signal received the event.
properties_jsonSTRINGJSON document — all event properties (including blueprint-mapped fields).
context_jsonSTRINGJSON document — page, device, consent metadata.

Query the JSON columns with : notation or parse_json() (e.g. properties_json:total::DOUBLE, context_json:consent). For native JSON typing, declare properties_json / context_json as VARIANT (Databricks Runtime 15.3+) — Signal sends a JSON string either way.

Stored event context

Alongside the fields your blueprint maps (where email, phone, names and address are stored as normalised SHA-256 by default), each row carries the event’s collected context exactly as Signal received it. The blueprint does not filter or hash the context: this is deliberate (decision 2026-09-23), so the context is complete for attribution, fraud and debugging queries, and it is listed here so you can decide what to keep.

StoredWhat it contains
Visitor requestIP address, user agent, Accept-Language, locale and timezone
PageURL including its query string, path, title and referrer
CampaignUTM source, medium, campaign, term and content
ConsentThe visitor’s consent state
LocationGeoIP country, region and city, and the network (ASN)
DeviceScreen size; for app events the OS and version, manufacturer, model, advertising ID and IDFV when the app collected them
Vendor IDsCookie and click identifiers in vendor_ids (for example the _fbp browser ID, gclid, ttclid, the GA client ID)
Session and librarySession ID, number and engagement time; the collector’s name and version
Partner attributesProfile attributes from partner enrichment (partner_attrs)

They are written to the ip_address, user_agent, page_url, page_path and page_referrer columns and, in full, to the context_json column, beside anonymous_id and user_id. Click and collected IDs outside the context are stored only where the blueprint maps them.

The IP address, device and advertising IDs, and cookie and click identifiers are personal data under UK and EU GDPR. To keep any of them out of storage, strip, mask or hash the field for every integration with the organisation data layer, apply URL redaction to page URLs, or remove it in the installed blueprint; and set the storage’s retention to match your privacy notice. See Personal data by integration.

Databricks is a first-party destination under your control. The default blueprint forwards all events. Apply consent filtering in pipeline transforms, or use downstream views that gate on context.consent if your governance requires it.

Testing

  1. Enable the integration in Signal and trigger a test event on your website.
  2. In the Databricks SQL editor, query the target table:
SELECT * FROM datafly.events.raw ORDER BY event_timestamp DESC LIMIT 10;
  1. Verify that event rows are appearing with correct data.
  2. In Signal, check the Live Events view to confirm delivery status shows as successful.

Troubleshooting

ProblemSolution
Events not appearing in the tableVerify the workspace URL, catalog, schema, table, and warehouse ID.
Unauthorized (401)The access token is invalid or expired. Generate a new token.
Forbidden (403)The user lacks MODIFY on the table. Grant Unity Catalog permissions: USE CATALOG, USE SCHEMA, MODIFY.
Warehouse not runningThe SQL warehouse auto-stopped. It will auto-start on the next request — the first event may have higher latency.
TABLE_OR_VIEW_NOT_FOUNDVerify the fully-qualified path catalog.schema.table.
UNRESOLVED_COLUMN / column mismatchThe target table does not match the canonical schema above. Recreate it with the exact column names from the Schema section.
Connection timeoutEnsure Signal can reach the workspace URL on port 443. Check network policies and IP allowlists.
Token expiredRotate the personal access token or refresh the service principal token.

Visit Databricks SQL Statement Execution API docs for endpoint reference and rate-limit guidance.

See also