Streaming architecture, SDKs and REST
Snowpipe Streaming accepts records directly. The high-performance architecture uses server-side pipes for ingestion and optional transformations.
Understand the idea
This module uses high-performance concepts. Classic streaming uses the older Java ingest SDK and a different table/channel model. For new work, follow current high-performance documentation and verify cloud/region and client-version support before installing dependencies.
| Concept | What it means |
|---|---|
| SDK | Handles transport and batching with language-specific APIs. |
| REST | Direct protocol integration when an SDK is unsuitable. |
| Named Channel | Stable channel identity and source-offset recovery. |
| Elastic Channel | Simpler at-least-once flow without named-channel offset management. |
A concrete example
A service sends event records without first writing JSON files to a bucket.
Remember: Choose one architecture and its matching SDK/API; classic and high-performance examples are not interchangeable.
Explain it step by step · full theory
Setup and reasoning
This module uses high-performance concepts. Classic streaming uses the older Java ingest SDK and a different table/channel model. For new work, follow current high-performance documentation and verify cloud/region and client-version support before installing dependencies.
Create a custom pipe when you need explicit mapping; current high-performance APIs also support default pipes. Authenticate with the supported SDK/REST flow, configure the service role and allow the documented network endpoints. The SQL below creates only the server definition: no client, channel or records are created by it.
Words used in this lesson
- SDK
- Handles transport and batching with language-specific APIs.
- REST
- Direct protocol integration when an SDK is unsuitable.
- Named Channel
- Stable channel identity and source-offset recovery.
- Elastic Channel
- Simpler at-least-once flow without named-channel offset management.
See how it works
Choose a step to explore the idea at your own pace.
Open the interactive explanation
Streaming architecture, SDKs and REST
Identify the input
Snowpipe Streaming accepts records directly. The high-performance architecture uses server-side pipes for ingestion and optional transformations.
Automatic playback is off for reduced motion. Select any step or use Previous and Next. Illustrations explain behavior; they are not live measurements.
Read the complete diagram explanation
- Identify the input
Snowpipe Streaming accepts records directly. The high-performance architecture uses server-side pipes for ingestion and optional transformations.
- Follow delivery
A service sends event records without first writing JSON files to a bucket.
- Verify and recover
Choose one architecture and its matching SDK/API; classic and high-performance examples are not interchangeable.
Try the SQL or command
Read → predict → run in your learning environment → compare. You can also learn by reading without an account.
New to SQL? Where to run it and how to read it
A query is a question written in SQL. Snowflake runs it and returns a result table. This website shows examples; it does not connect to your account.
- No account yet? Read and predict the output first. Follow the account and Snowsight lesson when you are ready.
- For SQL practice, use a learning account in Snowsight and select an authorized role and warehouse. A role determines permissions; a warehouse supplies processing power. Follow the example’s database/schema setup when it refers to stored objects.
- Read the entire example, including comments beginning with
--. Run the selected statement or labeled block in the stated order. Examples labeled Python, shell or HTTP belong in that client, not in a SQL editor. - Compare values and row counts with the explained result. If an example deliberately causes an error, follow its rollback and cleanup steps before continuing.
- SELECT / FROM
- Choose the values to return / identify their input.
- VALUES / COLUMN1
- VALUES supplies tiny example rows. COLUMN1 means their first column, COLUMN2 their second.
- AS / WITH
- AS gives a result a readable name. WITH names a temporary query step within one statement.
- NULL / ::
- NULL means missing or unknown. The :: notation converts a value to a named data type.
- Session
- One connection and its settings. Keep related transaction steps in the same session.
- Database.schema.table
- A full address for stored data. It is separate from the warehouse that processes queries.
Need the L2_OBJECTS_LAB setup? Open the first database-object lesson →
Help with common practice errors
- No active warehouse: select a warehouse your role can use. Do not assume you need to create a new one.
- Object missing or not authorized: check the full name, required setup and active role. Ask the account owner for access if needed.
- Object already exists: setup may already have run. Read the current state or choose a fresh lab name consistently; do not add OR REPLACE blindly.
- Different result: check whether an earlier INSERT or UPDATE changed the data. VALUES examples provide their own fresh input for each statement.
Before running this lesson
Manual examples only. Complete Modules 05–07 and the first lesson’s M8_LAB setup. Select L2_OBJECTS_LAB.M8_LAB in each SQL session. Replace every placeholder and choose exactly one cloud provider. Cloud IAM/notifications require authorized setup; streaming protocol outlines are explicitly non-executable. No credentials belong in this website.
Create an explicit streaming destination and pipe
CREATE TABLE M8_STREAM_EVENTS (EVENT_ID NUMBER, MESSAGE VARCHAR);
CREATE PIPE M8_STREAM_PIPE AS
COPY INTO M8_STREAM_EVENTS (EVENT_ID, MESSAGE)
FROM (SELECT $1:event_id::NUMBER, $1:message::VARCHAR
FROM TABLE(DATA_SOURCE(TYPE=>'STREAMING')));What to expect and why
No AUTO_INGEST or stage is needed for this pipe. The client sends objects with event_id and message to this streaming pipe.
Named-channel REST lifecycle
authenticate using supported credentials
open stable channel against M8_STREAM_PIPE
read returned committed offset and continuation token
append native row records with source offset tokens
use returned continuation tokens for subsequent requests
inspect committed progress and row errorsWhat to expect and why
Use the linked REST reference for exact endpoint payloads and token rules. An SDK encapsulates much of this protocol; this outline deliberately does not invent SDK method signatures.
Check your understanding
Choose an answer, then check your reasoning. This is practice, not a scored test.
Try it yourself
Why use an SDK instead of manually implementing REST continuation-token handling?
Compare your reasoning
The SDK reduces transport and batching work, while your application still owns source progress, error handling and recovery policy.
Official sources and curriculum
Module 08 · See module scope