Snowflake Streaming Destination
The Snowflake Streaming Destination streams data directly into Snowflake tables using the Snowpipe Streaming V2 API.
Each Cribl Stream Worker Process opens one Snowflake Channel per concurrent request to the target table. The number of channels per Worker Process equals the Request concurrency Advanced Setting, which defaults to 5. Channels are the streaming equivalent of partitions and handle parallel ingestion that scales up or down with load. Configure one Snowflake Streaming Destination per target table.
Type: Streaming | TLS Support: Yes | PQ Support: Yes
This Destination provides at-least-once delivery. If Cribl Stream does not receive confirmation that Snowflake accepted a batch – for example, due to a network interruption after Snowflake has already processed the payload – it retries the batch, which can result in duplicate rows in the target table. To monitor failed deliveries on the Snowflake side, see Snowpipe Streaming error tables in the Snowflake documentation.
Prerequisites
Before you configure the Destination, complete the following in your Snowflake account:
- Create a service user and configure key-pair authentication for it. Have your RSA private key in PEM format ready to paste when configuring the Destination.
- Grant privileges: the service user’s role needs
USAGEon the target database and schema, andINSERTon the target table. - Note your account identifier: it follows the format
<org_name>-<account_name>. See Account identifiers in the Snowflake documentation.
Configure a Snowflake Streaming Destination
In Cribl Stream, set up a Snowflake Streaming Destination.
On the top bar, select Products, and then select Cribl Stream. Under Worker Groups, select a Worker Group. Next, you have two options:
- To configure via QuickConnect, navigate to Routing > QuickConnect. Select Add Destination and select the Destination you want from the list, choosing either Select Existing or Add New.
- To configure via the Routes, select Data > Destinations. Select the Destination you want. Next, select Add Destination.
In the New Destination modal, configure the following under General Settings:
- Output ID: Enter a unique name to identify this Destination definition. If you clone this Destination, Cribl Stream will add
-CLONEto the original Output ID. A Description is optional. - Account identifier: Case-sensitive Snowflake account identifier in the format
<org_name>-<account_name>. For example:MYORG-MYACCOUNT. See Account identifiers in the Snowflake documentation. - User: Case-sensitive Snowflake username for the service account that Cribl Stream uses to authenticate.
- Private key: Select an existing private key or select Create to add a new one. Paste your RSA private key in PEM format.
- Target database: Case-sensitive name of the Snowflake database where the target table resides.
- Target schema: Case-sensitive name of the Snowflake schema that contains the target table.
- Target table: Case-sensitive name of the target table. The table must exist and its schema must be compatible with the events being sent. Configure one Destination per table.
- Output ID: Enter a unique name to identify this Destination definition. If you clone this Destination, Cribl Stream will add
Optionally, configure the following under Optional Settings:
- Role: Snowflake role to use when connecting. For example:
ACCOUNTADMIN. If empty, defaults to the role assigned to the User. - Backpressure behavior: Select whether to block, drop, or queue events when all receivers are exerting backpressure. Defaults to
Block. When this field is set toPersistent Queue, see Persistent Queue Settings for details. - Tags: Optionally, add tags to filter and group Destinations on the Manage Destinations page. Tags are not added to processed events. Use a tab or hard return between tag names.
- Role: Snowflake role to use when connecting. For example:
Optionally, adjust the Processing and Advanced Settings outlined in the sections below.
Select Save, then Commit & Deploy.
Use the Test tab in the Destination’s configuration modal to validate the configuration and connectivity.
Persistent Queue Settings
The Persistent Queue Settings tab displays when the Backpressure behavior option in General settings is set to Persistent Queue. Persistent queue buffers and preserves incoming events when a downstream Destination has an outage or experiences backpressure.
Before enabling persistent queue, learn more about persistent queue behavior and how to optimize it with your system:
- About Persistent Queues
- Optimize Destination Persistent Queues
- About Destination Backpressure Triggers
Some of these settings might not appear if you set the persistent queue storage mode to Network filesystem or AWS S3 at the Worker Group level (Worker Group Settings > System > PQ Storage). When using these storage types, this behavior is managed at the Worker Group level. See Worker Group PQ Storage Fields for more information.
On Cribl-managed Cloud Workers (with an Enterprise plan), this tab exposes only the destructive Clear Persistent Queue button (described at the end of this section). A maximum queue size of 1 GB disk space is automatically allocated per PQ-enabled Destination, per Worker Process. The 1 GB limit is on outbound uncompressed data, and no compression is applied to the queue.
This limit is not configurable. If the queue fills up, Cribl Stream blocks outbound data. To configure the queue size, compression, queue-full fallback behavior, and other options below, use a hybrid Group.
Mode: Use this menu to select when Cribl Stream engages the persistent queue in response to backpressure events from this Destination. The options are:
| Mode | Description |
|---|---|
| Error | Queues and stores data on a disk when the Destination is unavailable or in an error state. |
| Backpressure | Queues and stores data to a disk when it detects backpressure from the Destination until the backpressure event resolves. |
| Always On | Cribl Stream immediately queues and stores all data on a disk for all events, even when there is no backpressure. |
If a Worker/Edge Node starts with an invalid Mode setting, it automatically switches to Error mode. This might happen if the Worker/Edge Node is running a version that does not support other modes (older than 4.9.0), or if it encounters a nonexistent value in YAML configuration files.
File size limit: The maximum data volume to store in each queue file before closing it. Enter a numeral with units of KB, MB, and so on. Defaults to 10 MB. When you save the configuration, File size limit must be greater than or equal to Buffer size limit (bytes). Cribl Stream rejects invalid combinations.
Queue size limit: The maximum amount of disk space that the queue can consume on each Worker Process. When the queue reaches this limit, the Destination stops queueing data and applies the Queue-full behavior. Defaults to 5 GB. This field accepts positive numbers with units of KB, MB, GB, and so on. You can set it as high as 1 TB, unless you’ve configured a different Worker Process PQ size limit on the Worker Group/Fleet Settings page.
Queue file path: The location for the persistent queue files. Defaults to $CRIBL_HOME/state/queues. Cribl Stream appends /<worker-id>/<output-id> to this value.
Compression: Set the codec to use when compressing the persisted data after closing a file. Defaults to None. Gzip is also available.
Queue-full behavior: Whether to block or drop events when the queue begins to exert backpressure. A queue begins to exert backpressure when the disk is low or at full capacity. This setting has two options:
- Block: The output will refuse to accept new data until the receiver is ready. The system will return block signals back to the sender.
- Drop new data: Discard all new events until the backpressure event has resolved and the receiver is ready.
Buffer size limit (bytes): The maximum memory to buffer events before flushing them to persistent queue on disk. Enter a value with a unit suffix. For example: 64KB, 1MB, or 10MB. Spaces between the number and unit are allowed (such as 64 KB). Units are case-insensitive. Plain byte values (like 65536) are accepted, but decimals (like 0.5MB) are not. The valid range is 64KB to 10MB. Values outside this range are rounded to the nearest limit. Defaults to 1MB.
Deprecation Notice
The Buffer size limit (bytes) setting replaces the deprecated Max buffer size setting to provide more predictable memory management in version 4.18.0. The Max buffer size setting will be removed in version 4.19.1. For upgraded Worker Groups and Fleets, the new byte-based limit defaults to
1MB. Update your configurations to the new byte-based limit to ensure optimal memory stability.
Strict ordering: Toggle on (default) to enable FIFO (first in, first out) event forwarding, ensuring Cribl Stream sends earlier queued events first when receivers recover. The persistent queue flushes every 10 seconds in this mode. Toggle off to prioritize new events over queued events, configure a custom drain rate for the queue, and display this option:
- Drain rate limit (EPS): Optionally, set a throttling rate (in events per second) on writing from the queue to receivers. (The default
0value disables throttling.) Throttling the queue drain rate can boost the throughput of new and active connections by reserving more resources for them. You can further optimize Worker startup connections and CPU load in the Worker Processes settings.
Clear Persistent Queue: For Cloud Enterprise only, select this button if you want to delete the files that are currently queued for delivery to this Destination. If you select this button, a confirmation modal appears. Clearing the queue frees up disk space by permanently deleting the queued data, without delivering it to downstream receivers. This button only appears after you define the Output ID.
Use the Clear Persistent Queue button with caution to avoid data loss. See Steps to Safely Disable and Clear Persistent Queues for more information.
Processing Settings
Post-Processing
Pipeline: Pipeline or Pack to process data before sending the data out using this output.
System fields: A list of fields to automatically add to events that use this output. By default, includes cribl_pipe (identifying the Cribl Stream Pipeline that processed the event). Supports wildcards. Other options include:
cribl_host- Cribl Stream Node that processed the event.cribl_input- Cribl Stream Source that processed the event.cribl_output- Cribl Stream Destination that processed the event.cribl_ep- Cribl Stream Edge Processor that processed the event.cribl_route- Cribl Stream Route (or QuickConnect) that processed the event.cribl_group- Cribl Stream Worker Group or Fleet that processed the event.cribl_mode- Cribl Stream processing mode.
Advanced Settings
URL: Override the Snowflake account URL used to connect. If empty, Cribl Stream constructs the URL from the Account identifier field. Example: https://<account>.snowflakecomputing.com:443.
Body size limit (KB): Maximum size of the request body before compression. Defaults to 4096 KB.
Events-per-request limit: Maximum number of events to include in each request body. The default 0 allows unlimited events.
Request concurrency: Maximum number of concurrent requests per Worker Process. When Cribl Stream hits this limit, it begins throttling traffic. Defaults to 5.
Request timeout: Amount of time (in seconds) to wait for a request to complete before aborting it. Defaults to 30.
Snowflake channel open timeout: Amount of time (in seconds) to wait when opening a Snowflake Channel before aborting. Defaults to 30.
Flush period (sec): Maximum time (in seconds) between data flushes to the Snowflake Channel. Lower values reduce latency but may increase API call frequency. Defaults to 1.
Keep alive: When toggled on (default), Cribl Stream sends Keep-Alive headers to preserve the connection between requests.
Compress: When toggled on (default), compresses the payload body using zstd before sending.
Validate server certs: When toggled on (default), rejects certificates that are not authorized by a trusted CA.
Extra HTTP headers: Name-value pairs to pass as additional HTTP headers on all requests.
Failed request logging mode: Determines which data to log when a request fails. Options are None (default), Payload, or Payload + Headers. With Payload + Headers, Cribl Stream redacts all headers except those declared in Safe headers.
Safe headers: Headers to declare as safe to log in plaintext. Sensitive headers such as authorization are always redacted even if listed here.
Settings for failed HTTP requests: Configure automatic retry behavior for specific HTTP response status codes. For each entry, set:
- HTTP status code: The response code that triggers a retry (for example,
429or503). - Pre-backoff interval (ms): How long to wait before the first retry attempt.
- Backoff multiplier: Base for the exponential backoff algorithm. A value of
2means Cribl Stream retries after 2 s, then 4 s, then 8 s, and so on. - Backoff limit (ms): Maximum backoff interval before retries stop increasing.
Select Add Setting to add a status code. The default configuration retries on 401, 403, 408, 429, 500, 502, 503, 504, and 509.
Retry timed-out HTTP requests: When toggled on (default), automatically retries requests that time out. Exposes the following settings:
- Pre-backoff interval (ms): Wait time before the first retry. Defaults to
1000. - Backoff multiplier: Base for exponential backoff. Defaults to
2. - Backoff limit (ms): Maximum backoff interval. Defaults to
10000.
Honor Retry-After header: When toggled on (default), respects a Retry-After response header if the specified delay is 180 seconds or less. Takes precedence over all other retry settings when active.
Environment: If you’re using GitOps, optionally use this field to specify a single Git branch on which to enable this configuration. If empty, the config will be enabled everywhere.
Proxying Requests
If you need to proxy HTTPS requests, see System Proxy Configuration.
Troubleshooting
The Destination’s configuration modal has helpful tabs for troubleshooting:
Live Data: Try capturing live data to see real-time events as they flow through the Destination. On the Live Data tab, click Start Capture to begin viewing real-time data.
Logs: Review and search the logs that provide detailed information about the delivery process, including any errors or warnings that may have occurred.
Test: Ensures that the Destination is correctly set up and reachable. Verify that sample events are sent correctly by clicking Run Test.
You can also view the Monitoring page that provides a comprehensive overview of data volume and rate, helping you identify delivery issues. Analyze the graphs showing events and bytes in/out over time.