INSERT statement. Use it when notification data belongs in your Snowflake warehouse alongside other analytics sources.
Novu webhook delivery is powered by Svix. This connector maps to the Svix Snowflake advanced endpoint.
Outbound webhooks are available on Team and Enterprise plans.
Prerequisites
- A Snowflake account and its account identifier in
organization-accountform, for exampleab12345-xs67890. - An RSA key pair, with the public key assigned to a Snowflake user. This connector authenticates with key-pair JWT authentication, not a password. See key-pair authentication.
- The destination table created before you enable the endpoint. The connector does not create or alter tables.
Configuration
When you set a transformation, the statement names the target table directly, so database, schema, and table become optional.
Authentication and permissions
Generate an RSA key pair, assign the public key to the Snowflake user, and paste the complete matching private key into the connector. Svix does not publish a required privilege list. Scope the user with SnowflakeGRANT so it can insert into one table and nothing else:
DEFAULT_WAREHOUSE and DEFAULT_ROLE properties of CREATE USER so statements have compute to run on.
Default destination behavior
Without a transformation, Svix inserts into the table identified by the database, schema, and table fields using three columns. It generates a uniqueid, sets created_at to the insert time, and writes the raw payload to payload:
Create an analytics table
Transformation contract
The transformation shapes each batch into one SQL statement: The handler receives one delivery batch:input.events, an array whose length is capped by the endpoint batch sizeinput.events[].eventType, the Novu event type, for examplemessage.sentinput.events[].payload, the webhook body
payload.object is the resource type as a string, such as "message", and the resource itself is under payload.data.object. For message events, fields such as subscriberId and channel are therefore at event.payload.data.object. Other event families use different resource shapes, so guard extracted fields with defaults.
- Output: an object with
statementandbindings. statementis the SQL to execute, referencing bindings by name, for example:subscriber_id.bindingsis column-oriented. It is an object keyed by binding name, and each binding has a Snowflaketypeand avaluearray holding one entry per row in the batch. All arrays must be the same length.- Send every value as a string. For allowed types, see using bind variables in a statement.
event.payload.data.object:
FIXED type for numeric columns, and still push the value as a string.
Configure in the Dashboard
1
Add the endpoint
Open Webhooks in the Novu Dashboard, select Endpoints, click Add Endpoint, and choose Snowflake.2
3
4