Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Databricks destination


(new)

Beta

Data Destinations is currently available as a Private Beta product and the information contained in this document is subject to change. Data Destinations is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI. To learn more, see Private beta legal information.

Databricks(link takes you to an external page) is a data lakehouse platform for analytics, ML, and data warehousing. Sending events to Databricks lets you stream communications data directly into a Delta table for low-latency SQL analytics and downstream ML.

Twilio delivers events using Zerobus Ingest(link takes you to an external page), Databricks' push-based streaming service that writes records directly into a Unity Catalog Delta table with no intermediate broker. Twilio streams each event straight into your table over a gRPC connection, and the event is typically queryable within seconds. Check Databricks' ingestion availability(link takes you to an external page) documentation to confirm Zerobus Ingest is available in your workspace's region before setting up this destination.

Destination overview

destination-overview page anchor
  • Category: Warehouse
  • Release status: Beta
  • Authentication: OAuth (client ID and secret)
  • Regional availability: US1
Join the Data Destinations private beta

Get early access to native destinations for data warehouses, observability tools, and event pipelines.

Sign up(link takes you to an external page)

Eligible events

eligible-events page anchor

You can send all event types supported by Event Streams to Databricks. This destination has no user-identifier restriction.


Before you set up a Databricks destination, make sure you have:

  • A Databricks workspace on Amazon Web Services, Azure, or Google Cloud.
  • A Databricks service principal with an OAuth Client ID and Client Secret (found in your Databricks account under Service Principals).
  • An existing Unity Catalog catalog and schema that the service principal has USE CATALOG, USE SCHEMA, CREATE TABLE, MODIFY, and SELECT privileges on. CREATE TABLE is needed for initial provisioning of the destination table (twilio_events_<subscription ID>), and MODIFY/SELECT are needed for ongoing Zerobus Ingest writes and reads. The catalog and schema themselves must already exist. Twilio creates only the table.
  • A SQL warehouse for the service principal to use when Twilio creates the destination table.

(information)

Info

See Set up a destination for the full UI and Destinations API setup flow common to every destination type.

To create a Databricks destination in the Twilio Console:

  1. From your Databricks account, gather the settings listed in Destination settings.
  2. In the Twilio Console, go to Data > Data Destinations > Destinations > Add destination subscription.
  3. Complete the Add destination subscription wizard.

To create a Databricks destination through the Destinations API, send a POST request to the Destinations endpoint and set destinationType to databricks. For authentication and the other request body fields, see Create a destination.

Create a destination

create-a-destination page anchor
POST "https://destinations.twilio.com/v1/ControlPlane/Destinations"

Set the config object in the request body as follows:

NameTypeDescription
catalog
(Required)
stringUnity Catalog catalog that holds the target tables.
credentials.credentialType
(Required)
stringSet to CUSTOM.
credentials.clientId
(Required)
stringThe application ID (UUID) of your OAuth machine-to-machine service principal.
credentials.clientSecret
(Required)
stringThe OAuth secret generated for the service principal.
schema
(Required)
stringUnity Catalog schema (inside catalog) that holds the target tables.
warehouseId
(Required)
stringThe SQL warehouse that creates the per-subscription Delta table when you save a subscription.
workspaceUrl
(Required)
stringYour Databricks workspace URL, for example https://dbc-abc123.cloud.databricks.com.
zerobusEndpoint
(Required)
stringThe Zerobus gRPC ingest endpoint host, in the format WORKSPACE_ID.zerobus.REGION.cloud.databricks.com.

The following example shows a request body. Replace the uppercase placeholder values with your own.

1
{
2
"destinationType": "databricks",
3
"name": "My Databricks destination",
4
"config": {
5
"catalog": "CATALOG",
6
"credentials": {
7
"credentialType": "CUSTOM",
8
"clientId": "CLIENT_ID",
9
"clientSecret": "CLIENT_SECRET"
10
},
11
"schema": "SCHEMA",
12
"warehouseId": "WAREHOUSE_ID",
13
"workspaceUrl": "WORKSPACE_URL",
14
"zerobusEndpoint": "ZEROBUS_ENDPOINT"
15
}
16
}

Use databricks as the destinationType.

FieldDescriptionRequiredDefault or choices
Client IDOAuth service-principal Application ID (UUID). Sensitive, stored encrypted.YesNone
Client SecretOAuth secret generated for the service principal. Sensitive, stored encrypted.YesNone
Workspace URLYour Databricks workspace URL. For example, https://dbc-abc123.cloud.databricks.com.YesNone
Zerobus EndpointThe Zerobus gRPC ingest endpoint host for your workspace's region, in the form <workspace-id>.zerobus.<region>.cloud.databricks.com.YesNone
CatalogThe Unity Catalog catalog that holds the target table. You can't change this after creating the destination.YesNone
SchemaThe Unity Catalog schema (inside Catalog) that holds the target table. You can't change this after creating the destination.YesNone
SQL Warehouse IDThe SQL warehouse Twilio uses to create the destination table for you.YesNone

Twilio authenticates to Databricks by using OAuth 2.0 machine-to-machine (client credentials) with your service principal's Client ID and Client Secret. Twilio exchanges these for a short-lived access token and sends it as a bearer token on every request. Twilio never sends your Client Secret itself to Zerobus.

The SQL Warehouse ID and Zerobus Endpoint serve two different purposes. Twilio uses the SQL warehouse once when accessing the SQL Statement Execution API, to create the destination table the first time you save a subscription. Twilio streams every event after that directly into the table over Zerobus Ingest. The SQL warehouse isn't involved in ongoing delivery.

The first time you save a subscription, Twilio creates the destination table twilio_events_<subscription ID> in your configured catalog and schema.


FieldDatabricks column
Event IDevent_id
Event typeevent_type
Event timeevent_timestamp
Event payloadpayload

Verification and troubleshooting

verification-and-troubleshooting page anchor

When you save a Databricks destination, Twilio validates your Client ID and Client Secret by requesting an OAuth token from your workspace. If validation fails, check that:

  • Your Client ID and Client Secret are correct and haven't been revoked in Databricks.
  • Your Workspace URL is correct and reachable.

This validation confirms your credentials only. It doesn't confirm that the service principal has the required Unity Catalog grants or that your catalog and schema exist. If your principal is missing the required Unity Catalog grants or your catalog and schema don't exist, table creation or event delivery might fail after you save the destination. If events aren't arriving as expected, check your service principal's grants on the target catalog and schema.

Twilio doesn't currently offer a way to trigger a test event for this destination from either the Console or the Twilio command line interface (CLI). To confirm delivery is working, wait for a real event of a subscribed type to fire.

CauseWhat you'll seeFix
Invalid or revoked Client ID / Client SecretValidation fails with an auth errorRe-check the credentials in Databricks and update the destination
Service principal missing Unity Catalog grantsTable creation or delivery fails after the destination validatesGrant USE CATALOG, USE SCHEMA, and CREATE TABLE/MODIFY/SELECT to the service principal on your catalog and schema
Wrong region in Zerobus EndpointDelivery errors reported in the DebuggerConfirm the endpoint's region matches your workspace's region
Zerobus Ingest isn't available in your workspace's regionDelivery repeatedly fails and retries as a transient error in the Debugger, since a failed connection to the endpoint looks the same as a transient outageConfirm Zerobus Ingest is available for your workspace's region in Databricks' ingestion availability(link takes you to an external page) documentation
Target table's columns no longer match the expected schema (event_id/event_timestamp/event_type/payload)Delivery errors reported in the Debugger; not retriedDon't modify the table Twilio created. If the schema drifted, restore the original columns

If Twilio can't deliver events to your destination, Twilio sends an error notification to the Debugger (available in the United States (US1) region only). If Twilio continues to encounter delivery errors, Twilio notifies you every 20 minutes after the initial error.