- Home
- Destinations
- Snowflake
Send events to Snowflake
Continuous ingest into a customer-owned Snowflake table via Snowpipe-style staging.
What is Snowflake?
Snowflake is a cloud data platform used by most large data teams. As a destination, it gives your customers a SQL-queryable copy of every product event in the same warehouse they already use for finance, marketing, and product analytics. Pushrail uses a continuous-ingest model, events land in an external stage, then Snowpipe (or a Pushrail-driven COPY) loads them into the target table within seconds.
Why deliver events to Snowflake
- Lands in the warehouse the customer's analytics team already uses.
- SQL-first, every report, dashboard, and notebook in Snowflake gets your data for free.
- Cost ownership, compute is billed to the customer's Snowflake account, not yours.
- Same envelope shape as BigQuery, multi-warehouse customers see consistent columns.
How Pushrail delivers events to Snowflake
The Snowflake adapter writes batches of NDJSON to an external stage (the customer's S3 or Azure Blob bucket Pushrail also writes to, or a Snowflake-managed internal stage) and triggers Snowpipe for continuous ingestion. Tables follow the same shape as BigQuery: `event_id`, `event_type`, `occurred_at`, `customer_external_id`, `source`, `payload` (VARIANT), `metadata` (VARIANT), `received_at`. Customers choose table-per-event-type or single-table mode.
Auth and credentials
Pushrail authenticates with Snowflake using key-pair authentication (preferred, no rotating passwords) against a dedicated `PUSHRAIL_LOADER` role with `INSERT` on the destination schema. The private key is stored encrypted at rest. Rotations are dashboard-driven; the customer adds the new public key to Snowflake first, then activates the new private key in Pushrail, then revokes the old one.
Batching, retries, and replay
Default batches are 5 MB or 5,000 events with a 60-second window, tuned to keep Snowpipe credit cost low while keeping latency under a minute. Transient errors (warehouse suspended, network) retry with exponential backoff. Permanent errors (table not found, role lacks INSERT) land in the DLQ. Replay re-emits the same NDJSON batch with the same file name; Snowpipe's COPY HISTORY tracks the load and skips already-loaded files, so re-runs are idempotent at the warehouse level.
Example payload
Pushrail accepts the canonical event shape on POST /v1/events. Below is the ingestion request your service makes.
{
"eventType": "order.completed",
"occurredAt": "2026-05-26T14:21:08.493Z",
"source": "billing-service",
"customerExternalId": "acct_8K2zRq",
"idempotencyKey": "order_38a91f-completed",
"correlationId": "req_4f30b2",
"payload": {
"orderId": "ord_38a91f",
"amount": 12900,
"currency": "USD",
"items": [
{ "sku": "PR-PRO-MONTHLY", "qty": 1, "price": 12900 }
]
},
"metadata": {
"tier": "pro",
"region": "us-east-1"
}
}Example configuration
The fields your customer fills in to point Pushrail at their Snowflake setup.
{
"type": "SNOWFLAKE",
"name": "Customer Snowflake warehouse",
"account": "acmecorp-prod.snowflakecomputing.com",
"warehouse": "LOAD_WH",
"database": "ANALYTICS",
"schema": "PUSHRAIL_EVENTS",
"role": "PUSHRAIL_LOADER",
"stage": "ACME_PUSHRAIL_STAGE",
"tableStrategy": "TABLE_PER_EVENT_TYPE",
"auth": {
"mode": "KEY_PAIR",
"username": "PUSHRAIL_LOADER_USER",
"privateKeyPem": "-----BEGIN PRIVATE KEY-----\n…\n-----END PRIVATE KEY-----"
}
}Common use cases
- Add 'export to Snowflake' as a productized integration for enterprise customers.
- Let customer data teams build product analytics in the same warehouse as their other data.
- Replace bespoke per-customer ETL with a configurable adapter the customer points at their own database.
- Support customer-built reverse-ETL workflows that pull from Snowflake.
Related destinations
Stream events directly into a customer's BigQuery dataset, table per event type or single wide table.
High-throughput row-shaped event delivery into a customer's ClickHouse cluster, one row per event.
Deliver events as NDJSON files into a customer-owned S3 bucket, batched, partitioned, and idempotent.
Frequently asked questions
Do I need to build a Snowflake loader myself?
No. Pushrail's Snowflake adapter writes NDJSON batches to an external or internal stage and triggers Snowpipe-style continuous ingest into the customer's table. You send one canonical event to Pushrail and the adapter handles staging, loading, and schema mapping.
How does Pushrail authenticate to Snowflake?
With key-pair authentication (preferred, no rotating passwords) against a dedicated PUSHRAIL_LOADER role that has INSERT on the destination schema. The private key is stored encrypted at rest, and rotations are dashboard-driven: add the new public key in Snowflake, activate the new private key in Pushrail, then revoke the old one.
Who pays for the Snowflake compute?
The customer. Ingest runs in their Snowflake account, so loading and query compute is billed to them, not to you. Events land in the warehouse their analytics team already uses.
Are replays safe for Snowflake?
Yes. Transient errors (warehouse suspended, network) retry with exponential backoff and permanent errors (table not found, missing INSERT) land in the dead-letter queue. Replay re-emits the same NDJSON file name, and Snowpipe's COPY HISTORY skips already-loaded files, so re-runs are idempotent at the warehouse level.