Snowpipe Streaming inserts event data from applications and IoT devices directly into Snowflake tables at sub-second latency, without ever writing intermediate files. Where the original Snowpipe is a pull-based system triggered by file arrival, Snowpipe Streaming is a push-based streaming pipeline where the client actively sends row-level data.
The streaming API in the Snowflake Ingest SDK is the heart of Snowpipe Streaming. A client application uses the SDK to open a logical write path called a channel, then sends row data as a Map through the insertRow API. The data is converted into micro-partitions on Snowflake's serverless infrastructure and applied to the target table. No stages to create, no COPY INTO to run.
| Property | Details |
|---|---|
| SDK | Snowflake Ingest SDK (Java) |
| Protocol | REST over HTTPS |
| Write unit | Row (Map<String, Object>) |
| Latency | Sub-second to a few seconds |
| Stage | Not required |
| Warehouse | Not required (serverless) |
Both deliver automatic ingestion, but they differ fundamentally in input source, latency, and billing model.
| Aspect | Snowpipe | Snowpipe Streaming |
|---|---|---|
| Ingestion method | File-based (auto COPY INTO) | Direct row-level insert (InsertRow API) |
| Trigger | SQS / EventGrid / Pub/Sub notifications or REST API | Active push from the client SDK |
| Latency | 1-5 minutes | Sub-second to a few seconds |
| Stage required? | Yes (internal or external stage) | No |
| SDK required? | No (notification-driven, automatic) | Yes (Ingest SDK or Kafka Connector) |
| COPY_HISTORY | Recorded (per file) | Not recorded (row-level ingestion) |
| Cost model | Per-file Serverless Credits | Processing-volume-based Serverless Credits |
| Best for | Continuous batch loads of CSV or Parquet | Kafka events, IoT sensor data, real-time logs |
The Snowpipe Streaming data flow is a three-layer pipeline: client → channel → table. You can open multiple channels in parallel against a single table, and each channel tracks progress independently via its own offsetToken.
┌─────────────────────┐
│ Client App │ Snowflake Ingest SDK (Java)
│ / Kafka Connector │
└────────┬────────────┘
│ insertRow(Map)
▼
┌─────────────────────┐
│ Channel │ 論理的な書き込み経路
│ (offsetToken管理) │ テーブルごとに複数並列可
└────────┬────────────┘
│ HTTPS
▼
┌─────────────────────┐
│ Snowflake │ サーバーレスインフラ
│ Micro-partition │ 行データ → マイクロパーティション変換
│ ┌───────────────┐ │
│ │ Target Table │ │ 数秒以内にクエリ可能
│ └───────────────┘ │
└─────────────────────┘Here is a basic ingestion flow using the Snowflake Ingest SDK: create a client, open a channel, and push rows with insertRow.
// 1. ストリーミングクライアントの生成
Properties props = new Properties();
props.put("url", "https://<account>.snowflakecomputing.com");
props.put("user", "INGEST_USER");
props.put("private_key", privateKey);
props.put("role", "INGEST_ROLE");
SnowflakeStreamingIngestClient client =
SnowflakeStreamingIngestClientFactory
.builder("MY_CLIENT")
.setProperties(props)
.build();
// 2. チャネルのオープン
OpenChannelRequest req = OpenChannelRequest.builder("CH_ORDERS")
.setDBName("PROD_DB")
.setSchemaName("PUBLIC")
.setTableName("ORDERS")
.setOnErrorOption(OpenChannelRequest.OnErrorOption.CONTINUE)
.build();
SnowflakeStreamingIngestChannel channel = client.openChannel(req);
// 3. 行の挿入
Map<String, Object> row = new HashMap<>();
row.put("ORDER_ID", 10001);
row.put("CUSTOMER", "Tanaka");
row.put("AMOUNT", 5800);
row.put("ORDER_TS", "2026-03-27T10:30:00Z");
InsertValidationResponse resp = channel.insertRow(row, "offset-10001");
if (resp.hasErrors()) {
// エラーハンドリング
resp.getInsertErrors().forEach(e ->
System.err.println(e.getMessage()));
}
// 4. コミット済みオフセットの確認
String committed = channel.getLatestCommittedOffsetToken();
System.out.println("Last committed: " + committed);Open a channel with openChannel and close it when you're done. Each channel represents an independent write stream to a table.
| Operation | Method | Purpose |
|---|---|---|
| Open a channel | client.openChannel(request) | Establish a write path to the table |
| Insert rows | channel.insertRow(row, offsetToken) | One row at a time, or batch with insertRows |
| Check commit | channel.getLatestCommittedOffsetToken() | Retrieve the most recently persisted token |
| Close the channel | channel.close() | Release resources |
| Validity check | channel.isValid() | Confirm the channel has not been invalidated |
The offsetToken is a free-form string the client controls. For Kafka use the partition offset; for custom apps use a sequence number or UUID. On recovery, call getLatestCommittedOffsetToken to find the last commit point and resume from there — that's how you get ingestion with no duplicates and no gaps.
Snowflake guarantees at-least-once delivery, but with correct offsetToken management on the client you can build exactly-once semantics on top of it.
// 障害復旧時のリカバリパターン
SnowflakeStreamingIngestChannel channel = client.openChannel(req);
// 前回のコミット済みオフセットを取得
String lastCommitted = channel.getLatestCommittedOffsetToken();
// Kafkaの場合: lastCommittedオフセット以降からコンシュームを再開
long resumeOffset = Long.parseLong(lastCommitted) + 1;
consumer.seek(partition, resumeOffset);
// 再開地点から取り込みを継続
while (true) {
ConsumerRecords<String, String> records = consumer.poll(Duration.ofMillis(100));
for (ConsumerRecord<String, String> record : records) {
Map<String, Object> row = parseRecord(record);
channel.insertRow(row, String.valueOf(record.offset()));
}
}The Snowflake Kafka Connector ships with a Snowpipe Streaming mode. Configure it as a Kafka Connect Sink Connector and events from Kafka topics flow automatically into Snowflake tables through Snowpipe Streaming.
// Kafka Connector設定例(Snowpipe Streamingモード)
{
"connector.class": "com.snowflake.kafka.connector.SnowflakeSinkConnector",
"tasks.max": "4",
"topics": "orders_topic",
"snowflake.url.name": "<account>.snowflakecomputing.com",
"snowflake.user.name": "KAFKA_USER",
"snowflake.private.key": "${"
quot;}{file:/secrets/sf_key.pem}", "snowflake.role.name": "KAFKA_INGEST_ROLE", "snowflake.database.name": "PROD_DB", "snowflake.schema.name": "PUBLIC", "snowflake.ingestion.method": "SNOWPIPE_STREAMING", "snowflake.enable.schematization": "true", "buffer.count.records": "10000", "buffer.flush.time": "10", "buffer.size.bytes": "5000000" }
| Configuration parameter | Meaning |
|---|---|
| snowflake.ingestion.method | Set to SNOWPIPE_STREAMING to enable streaming mode |
| snowflake.enable.schematization | Set to true to auto-map JSON fields to table columns |
| buffer.count.records | Max records buffered before flush (affects cost efficiency) |
| buffer.flush.time | Buffer flush interval in seconds |
Snowpipe Streaming is billed as serverless compute. You don't start a warehouse, but the ingestion work itself consumes Serverless Credits.
| Cost driver | Impact | Optimization |
|---|---|---|
| Flush frequency | Frequent flushes burn more credits | Tune buffer settings to micro-batch |
| Channel count | Each channel adds overhead | Keep channel count to the minimum needed |
| Data volume | Proportional to bytes processed | Filter out unneeded columns before ingest |
-- コスト確認クエリ
SELECT
START_TIME,
END_TIME,
CREDITS_USED,
SERVICE_TYPE
FROM SNOWFLAKE.ACCOUNT_USAGE.METERING_HISTORY
WHERE SERVICE_TYPE = 'SNOWPIPE_STREAMING'
ORDER BY START_TIME DESC
LIMIT 20;SnowPro Core and Data Engineer exams frequently test when to choose Snowpipe vs Snowpipe Streaming.
| Question pattern | Key takeaway |
|---|---|
| Keywords like "low latency" or "real-time" | Snowpipe Streaming is the likely answer |
| "File-based" or "CSV/Parquet arrives" | Snowpipe (Auto-ingest) is the likely answer |
| "No stage needed" or "uses the SDK" | These are Snowpipe Streaming traits |
| "Check COPY_HISTORY" | Only Snowpipe is recorded (Streaming is excluded) |
| "Exactly-once" or "offsetToken" | Snowpipe Streaming offsetToken management |
Data Engineer
問題 1
A company wants to ingest telemetry data generated every second by thousands of IoT sensors into Snowflake and visualize it on a dashboard with sub-second freshness. The data is JSON, and the team explicitly wants to avoid writing files to cloud storage. Infrastructure for receiving the data via Kafka is already in place. Which ingestion approach fits best?
正解: A
Snowpipe Streaming is the right fit when you need sub-second latency and want to avoid writing files. Setting the Kafka Connector to SNOWPIPE_STREAMING mode ingests directly from Kafka topics into Snowflake tables at the row level. B (Snowpipe Auto-ingest) is file-based and incurs 1-5 minutes of latency, which fails the requirement. C (scheduled COPY INTO) is even slower at 5-minute intervals. D (direct INSERT INTO) requires a warehouse and is inefficient for high-volume sensor data.
How is Snowpipe Streaming different from Snowpipe?
Snowpipe auto-ingests files that land in cloud storage, triggered by SQS notifications or a REST API call. Snowpipe Streaming skips files entirely: it inserts rows directly into a table at sub-second latency through the Snowflake Ingest SDK or the Kafka Connector. No stages, no COPY INTO — just rows pushed via the InsertRow API through a logical write path called a channel. Snowpipe is the right choice for continuous file-based ingestion; Snowpipe Streaming is built for event streams, IoT data, and other real-time workloads.
How does Snowpipe Streaming achieve exactly-once delivery?
Every channel exposes an offsetToken that the client attaches to each insertRow call. After a successful insert, getLatestCommittedOffsetToken returns the last committed token, so on recovery you can resume from the next token and avoid duplicates. That's how exactly-once semantics are built on the client side. Snowflake itself only guarantees at-least-once — exactly-once depends entirely on disciplined offsetToken management in your application code.
How is Snowpipe Streaming billed?
Snowpipe Streaming uses a serverless compute model. You don't provision a virtual warehouse — Snowflake allocates resources for you. Charges are measured in Serverless Credits based on data volume ingested and processing time. Unlike Snowpipe's per-file billing, cost is driven by insert frequency and batch size, so micro-batching rows (instead of sending one at a time) significantly improves cost efficiency. You can track Snowpipe Streaming credits specifically through the ACCOUNT_USAGE.METERING_HISTORY view.
Practice with certification-focused question sets
無料で問題を解いてみるNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Snowflake Certifications: All 11 Exams Explained (2026)
Every SnowPro certification — Associate, Core, Specialty, Ad...
Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)
All 11 SnowPro exams ranked by difficulty with study-time es...
Snowflake Study Guide: Fastest Pass Route by Exam (2026)
How to pass SnowPro certifications efficiently — official ma...
SnowPro Core (COF-C03): Complete Exam Guide (2026)
Pass the SnowPro Core exam — six domains, scope, sample ques...
SnowPro Associate Platform (SOL-C01): Complete Guide (2026)
The entry-level SnowPro Associate exam — scope, weighting, s...