Snowflake

Snowpipe Streaming Guide: Low-Latency Ingestion and How It Differs from Snowpipe

2026-03-26
更新: 2026-03-27
NicheeLab Editorial Team

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.

Overview of Snowpipe Streaming

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.

PropertyDetails
SDKSnowflake Ingest SDK (Java)
ProtocolREST over HTTPS
Write unitRow (Map<String, Object>)
LatencySub-second to a few seconds
StageNot required
WarehouseNot required (serverless)

Snowpipe vs Snowpipe Streaming Comparison

Both deliver automatic ingestion, but they differ fundamentally in input source, latency, and billing model.

AspectSnowpipeSnowpipe Streaming
Ingestion methodFile-based (auto COPY INTO)Direct row-level insert (InsertRow API)
TriggerSQS / EventGrid / Pub/Sub notifications or REST APIActive push from the client SDK
Latency1-5 minutesSub-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_HISTORYRecorded (per file)Not recorded (row-level ingestion)
Cost modelPer-file Serverless CreditsProcessing-volume-based Serverless Credits
Best forContinuous batch loads of CSV or ParquetKafka events, IoT sensor data, real-time logs

Architecture

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  │ │  数秒以内にクエリ可能
│   └───────────────┘ │
└─────────────────────┘

Implementation Example with the Java SDK

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);

Channel Management and offsetToken

Open a channel with openChannel and close it when you're done. Each channel represents an independent write stream to a table.

OperationMethodPurpose
Open a channelclient.openChannel(request)Establish a write path to the table
Insert rowschannel.insertRow(row, offsetToken)One row at a time, or batch with insertRows
Check commitchannel.getLatestCommittedOffsetToken()Retrieve the most recently persisted token
Close the channelchannel.close()Release resources
Validity checkchannel.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.

Implementing Exactly-Once Delivery

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()));
    }
}

Kafka Connector Integration

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 parameterMeaning
snowflake.ingestion.methodSet to SNOWPIPE_STREAMING to enable streaming mode
snowflake.enable.schematizationSet to true to auto-map JSON fields to table columns
buffer.count.recordsMax records buffered before flush (affects cost efficiency)
buffer.flush.timeBuffer flush interval in seconds

Cost Model

Snowpipe Streaming is billed as serverless compute. You don't start a warehouse, but the ingestion work itself consumes Serverless Credits.

Cost driverImpactOptimization
Flush frequencyFrequent flushes burn more creditsTune buffer settings to micro-batch
Channel countEach channel adds overheadKeep channel count to the minimum needed
Data volumeProportional to bytes processedFilter 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;

What the Exam Tests

SnowPro Core and Data Engineer exams frequently test when to choose Snowpipe vs Snowpipe Streaming.

Question patternKey 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

Sample Question

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?

  1. Use Snowpipe Streaming (Kafka Connector in SNOWPIPE_STREAMING mode)
  2. Use Snowpipe Auto-ingest (SQS notifications) to auto-load S3 files
  3. Run COPY INTO on a 5-minute cron schedule
  4. Run INSERT INTO ... VALUES statements directly from the application

正解: 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.

Frequently Asked Questions

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.

Check what you learned with practice questions

Practice with certification-focused question sets

無料で問題を解いてみる
Author

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.


Related articles
Snowflake

Snowflake Certifications: All 11 Exams Explained (2026)

Every SnowPro certification — Associate, Core, Specialty, Ad...

Snowflake

Snowflake Exam Difficulty Ranking: All 11 Certs Compared (2026)

All 11 SnowPro exams ranked by difficulty with study-time es...

Snowflake

Snowflake Study Guide: Fastest Pass Route by Exam (2026)

How to pass SnowPro certifications efficiently — official ma...

Snowflake

SnowPro Core (COF-C03): Complete Exam Guide (2026)

Pass the SnowPro Core exam — six domains, scope, sample ques...

Snowflake

SnowPro Associate Platform (SOL-C01): Complete Guide (2026)

The entry-level SnowPro Associate exam — scope, weighting, s...

Browse all Snowflake articles (103)
© 2026 NicheeLab All rights reserved.