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

Snowflake 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.

Snowflake(link takes you to an external page) is a cloud data warehouse that lets you send event data directly into your Snowflake account for real-time analysis alongside your other business data.

Destination overview

destination-overview page anchor
  • Category: Warehouse
  • Release status: Beta
  • Authentication: Key pair
  • 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 Snowflake. There's no user-identifier restriction for this destination.


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

  • A Snowflake account.
  • A Username: your Snowflake login name used for key-pair authentication.
  • A Private Key (PEM): the PEM-encoded RSA private key paired with a public key registered on your Snowflake user, used for key-pair authentication.
  • Your Snowflake Account Identifier (for example xy12345.us-east-1 or orgname-accountname).
  • An existing Database and Schema in Snowflake. Twilio verifies the schema exists before activating the destination but doesn't create it for you, so both must already exist and be visible to the role associated with your credentials.
  • A Snowflake user whose default role has USAGE on that database and schema, plus CREATE TABLE and CREATE PIPE on the schema. Twilio provisions your destination table and Snowpipe Streaming pipe under that role. The destination has no separate role setting.

(information)

Info

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

To create a Snowflake destination in the Twilio Console:

  1. From your Snowflake 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 Snowflake destination through the Destinations API, send a POST request to the Destinations endpoint and set destinationType to snowflake. 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
account
(Required)
stringYour Snowflake account identifier, for example xy12345.us-east-1 or orgname-accountname.
credentials.credentialType
(Required)
stringSet to KEY_PAIR.
credentials.privateKey
(Required)
stringYour PEM-encoded RSA private key for key-pair authentication.
credentials.username
(Required)
stringThe Snowflake login name for key-pair authentication.
database
(Required)
stringThe Snowflake database that holds the target tables.
schema
(Required)
stringThe Snowflake schema that holds the target tables.

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

1
{
2
"destinationType": "snowflake",
3
"name": "My Snowflake destination",
4
"config": {
5
"account": "ACCOUNT",
6
"credentials": {
7
"credentialType": "KEY_PAIR",
8
"privateKey": "PRIVATE_KEY",
9
"username": "USERNAME"
10
},
11
"database": "DATABASE",
12
"schema": "SCHEMA"
13
}
14
}

Use snowflake as the destinationType.

FieldDescriptionRequiredDefault or choices
UsernameSnowflake login name used for key-pair authentication.YesMax 255 characters
Private Key (PEM)PEM-encoded RSA private key used for key-pair authentication. Marked as sensitive, stored encrypted after entry.YesN/A
Account IdentifierSnowflake account identifier (for example, xy12345.us-east-1 or orgname-accountname).YesMax 63 characters
DatabaseThe Snowflake database Twilio delivers events into. Can't be changed once the destination is created.YesMax 255 characters
SchemaThe Snowflake schema Twilio delivers events into. Can't be changed once the destination is created.YesMax 255 characters

Twilio authenticates to Snowflake by using key-pair JWT authentication. Twilio signs a JWT with your private key, and Snowflake validates it against the public key registered on your Snowflake user. Twilio stores your private key encrypted, and it never appears in event payloads. You can rotate your key pair at any time by updating the destination with a new private key.

Twilio delivers events to your table using Snowpipe Streaming(link takes you to an external page), the Snowflake low-latency ingestion API, not bulk file loads or INSERT statements. In most cases, Twilio streams through a single, default Snowpipe Streaming pipe per table. For higher-throughput subscriptions, Twilio can provision additional pipes on the same table (up to 10) to increase ingestion parallelism. Twilio manages this pipe count based on your subscription's volume. It isn't a setting you configure on the destination.

The first time you save a subscription, Twilio automatically creates the destination table TWILIO_EVENTS_<SUBSCRIPTION_ID> in your configured database and schema. Table names are uppercase, and any . or - in the subscription ID is replaced with _.


FieldSnowflake column
Event IDevent_id
Event timeevent_timestamp
Event typeevent_type
Event payloadpayload (JSON)

Verification and troubleshooting

verification-and-troubleshooting page anchor

When you save a Snowflake destination, Twilio authenticates with your key-pair credentials and confirms the configured database and schema are visible to your Snowflake role before marking the destination active. If validation fails, check that:

  • Your Username and Private Key are correct and the public key is still registered on your Snowflake user.
  • Your Account Identifier matches your Snowflake account exactly.
  • Your Database and Schema already exist and are visible to the role associated with your credentials. Twilio doesn't create the schema for you.

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

CauseWhat you'll seeFix
Invalid or unregistered key pairValidation fails with an authentication errorRe-check your username and private key, and confirm the matching public key is registered on your Snowflake user
Schema doesn't existValidation fails with a "schema not found" errorCreate the schema in Snowflake, then retry
Wrong Account IdentifierValidation fails even with correct credentialsConfirm your account identifier format in Snowflake and update the destination
Default role lacks CREATE TABLE or CREATE PIPE on the schemaDestination saves successfully, but the subscription fails to provision (reported as a resource error on the subscription)Grant USAGE on the database/schema and CREATE TABLE, CREATE PIPE on the schema to the Snowflake user's default role, then retry
Snowpipe Streaming returns 410 (Gone) or a 5xx statusDelivery errors reported in the Debugger. Twilio resets the ingestion channel and retriesRetry is automatic. Sustained errors may indicate a transient Snowflake outage, so check the Snowflake status page
Snowpipe Streaming rejects the batch for another reason (4xx other than 410)Delivery errors reported in the Debugger; not retriedCheck your subscription's mapping and the target table's schema for a mismatch
The destination's per-subscription table state is missing or corrupted (internal error)Delivery errors reported in the Debugger; not retriedContact Twilio support. This indicates the destination wasn't fully provisioned

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