What you will be able to do
- Explain where the Snowflake Kafka connector runs and how it is installed in a Kafka Connect cluster
- Configure a single connector to route several topics to named tables with snowflake.topic2table.map
- Choose between Snowpipe and Snowpipe Streaming and tune the buffer.* flush settings
- Predict the shape of a landed table under the classic connector and under v4, and control what RECORD_METADATA contains
Key concept
Connector placement — Each Snowflake connector runs inside the framework it extends. The Kafka connector runs in Kafka Connect, the Spark connector runs as a plugin in the Spark cluster, the Python connector runs inside your application, and a native connector runs inside Snowflake as a Native App. Where a connector runs decides who installs it, where its credentials live and what infrastructure you have to operate.
1.Where the Kafka connector runs and how it is installed
The Snowflake Connector for Kafka is a sink that reads messages from Kafka topics and writes them into Snowflake tables. It runs in neither Snowflake nor the Kafka brokers. It runs in Kafka Connect, a framework for linking Kafka to external systems. A Kafka Connect cluster is separate from the Kafka cluster, and it is the Connect cluster that runs and scales out connectors. Snowflake sees each topic as a stream of rows. In general each message becomes one row, and the usual pattern is one topic feeding one table.
Snowflake ships two builds, one for Confluent's Kafka package and one for open-source Apache Kafka. Confluent Cloud also offers a hosted version. There are also two generations. The classic connector (v3 and earlier) is fully supported today, but Snowflake plans to announce its deprecation in mid-2026, and an 18-month migration window starts at that announcement. Use v4 for all new implementations. The generation affects more than support dates, because v4 lands data in a different table shape, as the last section of this page explains.
To install a self-managed connector, download the connector JAR from Maven Central and copy it into <kafka_dir>/libs. Two extra JARs may be needed. Bouncy Castle decrypts an encrypted private key, and the Avro JAR is needed if your topics carry Avro. The connector authenticates with a key pair: snowflake.user.name plus snowflake.private.key, and snowflake.private.key.passphrase if the key is encrypted. Kafka Connect broadcasts the configuration, private key included, from the master node to the worker nodes. Secure the channel between Connect nodes and restrict read and write access to the configuration file.
Checkpoint 1 of 8· Check yourself
A team runs the self-managed Snowflake Connector for Kafka. Ingestion is falling behind, and they want to add capacity where the connector actually runs. What should they scale out?
The Kafka connector runs in Kafka Connect, not in the Kafka brokers or in Snowflake. Kafka Connect is a separate cluster, and it runs and scales out connectors.
“A Kafka Connect cluster is a separate cluster from the Kafka cluster. The Kafka Connect cluster supports running and scaling out connectors”Source: docs.snowflake.com
2.Configuring the connector and routing topics to tables
The connector reads one configuration file: JSON in distributed mode, or a properties file in standalone mode. Each file names exactly one database and one schema. A single connector can read any number of topics, but all of their tables must be in that one database and schema.
connector.class=com.snowflake.kafka.connector.SnowflakeSinkConnector
tasks.max=8
topics=topic1,topic2
snowflake.topic2table.map= topic1:table1,topic2:table2
buffer.count.records=10000
buffer.flush.time=60
buffer.size.bytes=5000000
snowflake.url.name=myorganization-myaccount.snowflakecomputing.com:443
snowflake.user.name=jane.smith
snowflake.private.key=xyz123
snowflake.private.key.passphrase=jkladu098jfd089adsq4r
snowflake.database.name=mydb
snowflake.schema.name=myschema
key.converter=org.apache.kafka.connect.storage.StringConverter
value.converter=com.snowflake.kafka.connector.records.SnowflakeAvroConverterThe properties fall into four groups, and each group does a different job:
- Routing:
topics(a comma-separated list) ortopics.regex(never both), plus the optionalsnowflake.topic2table.map. - Buffering:
buffer.count.records,buffer.flush.timeandbuffer.size.bytesdecide when buffered records are sent to Snowflake. - Serialization:
value.convertertells the connector how to read record values, for exampleSnowflakeJsonConverterfor JSON orSnowflakeAvroConverterfor Avro with a Schema Registry.key.converterhandles record keys. - Location and identity:
snowflake.url.name, the user and key,snowflake.database.nameandsnowflake.schema.name.
Only the routing group decides which table a topic lands in. If you leave out snowflake.topic2table.map, the connector derives each table name from its topic name and creates the table if it does not exist. If you set the map, the connector switches to explicit mapping mode. The value is a comma-separated list of topic:table pairs, so one connector can send orders, refunds and shipments to three tables with custom names. Explicit mode can also map several topics to a single table. Buffer sizes, converters and schema settings play no part in naming the destination.
| Situation | Classic connector (v3) | Connector v4 |
|---|---|---|
| Valid lowercase name | Converted to uppercase | Used as the table name, converted to uppercase |
| First character is not a letter or underscore | An underscore is prepended | Treated as invalid characters |
| Illegal characters inside the name | Each is replaced with an underscore | Replaced with underscores, and an underscore plus a hash code is always appended (my-topic.data becomes MY_TOPIC_DATA_<hash>) |
| Two topics clean up to the same name | An underscore plus a generated hash is appended (numbers+x and numbers-x would both be NUMBERS_X) | Already unique, because of the hash |
Checkpoint 2 of 8· Check yourself
Your properties file sets topics=orders,refunds and leaves out snowflake.topic2table.map. No tables exist yet in the target schema. What happens when the connector starts reading?
The topic map is optional. Without it, the connector derives each table name from its topic name and creates the table if it does not exist. A valid lowercase topic name is simply converted to uppercase.
“If the topics are not mapped, then the Kafka connector creates a new table for each topic using the topic name.”Source: docs.snowflake.com
Checkpoint 3 of 8· Exam question
A data engineering team configures a single Kafka Connect sink connector to ingest from three topics — orders, refunds, and shipments — into three separately named Snowflake tables instead of the connector's default per-topic naming. Which configuration approach lets them redirect each topic to a specific target table without deploying three separate connectors?
Correct answer: A — Set the snowflake.topic2table.map property to a comma-separated list of topic:table pairs so each topic routes to its intended table.
- A. This is correct because
snowflake.topic2table.mapis the property designed to override the connector's default one-topic-to-one-table naming with an explicit mapping. It accepts comma-separated topic:table pairs, letting one connector fan messages out to differently named tables. - B. This is incorrect because
buffer.count.recordsonly controls how many records accumulate before the connector flushes to Snowflake; it has no effect on which table a topic's messages land in. - C. This is incorrect because the key converter class governs how the connector deserializes a record's key format, not which target table receives the record's rows.
- D. This is incorrect because schematization controls how the connector evolves a table's columns to match the ingested record's schema; it does not choose which table a topic writes into.
3.Ingestion method and buffer flushing
The connector only loads data, and it has exactly two loading methods: Snowpipe and Snowpipe Streaming. It cannot write to an external table, and it does not schedule Tasks to load staged files. With Snowpipe, buffered records are ingested into Snowflake as data files. Snowpipe Streaming is Snowflake's row-level, low-latency ingest API, and it skips the file-staging step. With Streaming, the connector calls the API once after each flush, and the data reaches Snowflake about one second later. If dashboards have to show events almost immediately, choose Snowpipe Streaming. With Streaming the connector also delivers exactly-once by default, so messages are neither duplicated nor lost.
| Property | What it limits | Default |
|---|---|---|
| buffer.flush.time | Seconds between buffer flushes (minimum 1) | 10 |
| buffer.count.records | Records buffered in memory per Kafka partition | 10000 |
| buffer.size.bytes | Cumulative bytes buffered in memory per Kafka partition | 20000000 (20 MB) |
Under light traffic, a partition's buffer seldom reaches 10,000 records or 20 MB, so the timer triggers almost every flush. A connector that flushes every few seconds and creates many small loads therefore needs a larger buffer.flush.time. Snowflake recommends exactly that when cost matters more than latency, and recommends a smaller value when data arrives at higher rates. The count and size limits apply per Kafka partition, so adding tasks only moves partitions between tasks. It does not change when any partition's buffer fills. Raising the flush time has one limit: the in-memory buffer must still flush before it fills, or the connector can run out of memory.
Checkpoint 4 of 8· Check yourself
Operations dashboards must show Kafka events within seconds of their being produced. Which way of landing the data does the Snowflake Kafka connector support for this?
The connector only loads data, and it has exactly two methods: Snowpipe, which ingests buffered records as files, and Snowpipe Streaming. Streaming skips file staging and lands data about one second after each flush. The connector cannot write to external tables or schedule Tasks.
“The current version of the Kafka connector is limited to loading data into Snowflake. The Kafka connector supports two data loading methods:”Source: docs.snowflake.com
Checkpoint 5 of 8· Exam question
A streaming platform team must load Kafka messages into Snowflake with sub-second latency so downstream dashboards reflect events almost immediately, rather than tolerating the file-staging delay of periodic loads. Which ingestion mode should they configure the Kafka connector to use?
Correct answer: A — Configure the connector for Snowpipe Streaming, which writes rows directly through the low-latency streaming API without staging files.
- A. This is correct because Snowpipe Streaming ingests rows through a low-latency API that writes directly to table storage, avoiding the file-staging step and giving the sub-second latency this scenario requires.
- B. This is incorrect because the classic Snowpipe mode stages files and waits for an event notification before loading, which adds the file-staging delay the team explicitly wants to avoid.
- C. This is incorrect because batching into hourly stages with a scheduled Task introduces an hour-scale delay, far short of the sub-second freshness the dashboards need.
- D. This is incorrect because external tables read files already sitting in cloud storage and are not a Kafka connector ingestion mode at all, so this does not address loading connector records.
Checkpoint 6 of 8· Exam question
A connector deployment is flushing to Snowflake every few seconds under low traffic, creating far more small load operations than the team wants, even though the record-count threshold is rarely reached. Which setting should they raise to reduce flush frequency during quiet periods?
Correct answer: A — Increase buffer.flush.time so the connector waits longer before flushing when neither the record count nor byte size threshold has been hit.
- A. This is correct because
buffer.flush.timesets the maximum time the connector waits before flushing buffered records, and raising it reduces how often small, low-traffic flushes fire. - B. This is incorrect because the topic-to-table map only controls routing of topics to tables; changing its entries does not change how often any individual topic's buffer flushes.
- C. This is incorrect because
tasks.maxcontrols parallelism across Connect tasks, and adding tasks does not raise the time or size threshold that triggers each task's own flush. - D. This is incorrect because Kafka topic replication factor is a durability setting for the topic's partitions and has no relationship to the Snowflake connector's buffer flush timing.
4.What the landed table looks like: classic columns vs v4 schematized tables
By default, the classic connector lands every message in two VARIANT columns. RECORD_CONTENT holds the Kafka message and RECORD_METADATA holds information about it. The message is stored as JSON or Avro without being parsed or split into columns. If you create the table yourself, any extra columns must allow NULL, because the connector never supplies values for them. When the target is an Iceberg table, the same two columns become structured types instead of VARIANT.
select
record_metadata:CreateTime,
record_content:ID
from table1
where record_metadata:topic = 'PressureOverloadWarning';Connector v4 lands a schematized table instead. If the table does not exist, the connector creates it with one column per first-level JSON key. It then writes through a default pipe named {tableName}-STREAMING, which matches keys to columns by name, ignoring case. Nested objects and arrays fit in VARIANT columns. If a message carries a key that has no matching column, the connector drops it, unless ENABLE_SCHEMA_EVOLUTION is set on the table. With that setting, the new key becomes a new column (table schema evolution). If a pipe with the same name as the target table already exists, the connector uses that pipe instead. Its COPY INTO reads from DATA_SOURCE(TYPE => 'STREAMING') and can rename, cast and pull out metadata. User-defined pipes are not supported with client-side validation (snowflake.validation=client_side).
CREATE PIPE ORDERS AS
COPY INTO ORDERS_TABLE
FROM (
SELECT
$1:order_id::NUMBER,
$1:customer_name,
$1:order_total,
$1:RECORD_METADATA.topic AS source_topic,
$1:RECORD_METADATA.offset::NUMBER AS kafka_offset,
$1:RECORD_METADATA.SnowflakeConnectorPushTime::BIGINT AS ingestion_time
FROM TABLE(DATA_SOURCE(TYPE => 'STREAMING'))
);| Field | Contents | Controlled by |
|---|---|---|
| topic | Kafka topic the record came from | snowflake.metadata.topic |
| partition, offset | Kafka partition (not a micro-partition) and offset within it | snowflake.metadata.offset.and.partition |
| CreateTime / LogAppendTime | Kafka record timestamp, milliseconds since epoch | snowflake.metadata.createtime |
| SnowflakeConnectorPushTime | When the connector pushed the record into the ingest buffer | Always available in v4 |
| key, headers | Message key and user-defined headers | snowflake.metadata.all; key also needs key.converter set to StringConverter |
All four flags default to true. Setting one to false removes its fields from RECORD_METADATA. The metadata costs about 150 bytes per record, which can be a large share of a small payload and shows up on the bill. If you don't need it, set snowflake.metadata.all=false. Keys are easy to lose: unless key.converter is org.apache.kafka.connect.storage.StringConverter, the connector ignores the message key.
Checkpoint 7 of 8· Fill the gap
This query reads a table that the classic Kafka connector loaded with its default schema. Which column completes the query so that it returns the ID field from the Kafka message itself?
select
record_metadata:CreateTime,
? :ID
from table1
where record_metadata:topic = 'PressureOverloadWarning';The classic connector does not split the message into one column per field. It stores the whole message, unparsed, in the RECORD_CONTENT VARIANT column, so you reach a field such as ID with path syntax on record_content. RECORD_METADATA holds information about the message, such as topic and CreateTime, not its payload.
Source: docs.snowflake.comCheckpoint 8 of 8· Check yourself
Analysts notice that RECORD_METADATA has topic, partition and offset but never a key, even though every message is keyed. The connector uses key.converter=org.apache.kafka.connect.json.JsonConverter and leaves all metadata flags at their defaults. What change makes the connector store the key?
The connector stores the message key only when key.converter is the StringConverter. With any other converter it ignores keys. The metadata flags already default to true, so setting them changes nothing, and the loading method has no effect on keys.
“the key.converter parameter in the connector configuration properties must be set to org.apache.kafka.connect.storage.StringConverter; otherwise, the connector ignores keys.”Source: docs.snowflake.com
Sources
(4)
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“A Kafka Connect cluster is a separate cluster from the Kafka cluster.”
↩︎ Where the Kafka connector runs and how it is installed“With Snowflake, the typical pattern is that one topic supplies messages (rows) for one Snowflake table.”
↩︎ Where the Kafka connector runs and how it is installed“Recommendation: Use the Snowflake Connector for Kafka (v4) for all new implementations.”
↩︎ Where the Kafka connector runs and how it is installed“The Kafka connector supports two data loading methods:”
↩︎ Ingestion method and buffer flushing“any additional columns must allow NULL values because data from the connector does not include values for those columns”
↩︎ What the landed table looks like: classic columns vs v4 schematized tables“The Kafka connector is designed to run in a Kafka Connect cluster”
↩︎ Key concept“If the topics are not mapped, then the Kafka connector creates a new table for each topic using the topic name.”
↩︎ Exam trap 1“The data is not parsed, and the data is not split into multiple columns in the Snowflake table.”
↩︎ Exam trap 2“A Kafka Connect cluster is a separate cluster from the Kafka cluster. The Kafka Connect cluster supports running and scaling out connectors”
↩︎ Checkpoint“To avoid accidental duplication of table names, the connector appends a suffix to the table name.”
↩︎ Prediction“If the topics are not mapped, then the Kafka connector creates a new table for each topic using the topic name.”
↩︎ Checkpoint“The current version of the Kafka connector is limited to loading data into Snowflake. The Kafka connector supports two data loading methods:”
↩︎ Checkpoint - 2.
“Copy the JAR files you downloaded in Download the Kafka Connector JAR Files to the <kafka_dir>/libs folder.”
↩︎ Where the Kafka connector runs and how it is installed“a connector can ingest messages from any number of topics, but the corresponding tables must all be stored in a single database and schema.”
↩︎ Configuring the connector and routing topics to tables“The configuration file should contain either topics or topics.regex, not both.”
↩︎ Configuring the connector and routing topics to tables - 3.
“The snowflake.topic2table.map parameter accepts a comma-separated list of topic-to-table mappings in the format:”
↩︎ Configuring the connector and routing topics to tables“Appends an underscore followed by a hash code to ensure uniqueness”
↩︎ Configuring the connector and routing topics to tables“If keys from the JSON don’t match the table columns, the connector ignores the keys unless ENABLE_SCHEMA_EVOLUTION is enabled on the table”
↩︎ What the landed table looks like: classic columns vs v4 schematized tables“If you don’t need metadata, you can reduce this overhead by setting snowflake.metadata.all=false.”
↩︎ What the landed table looks like: classic columns vs v4 schematized tables“must be set to org.apache.kafka.connect.storage.StringConverter; otherwise, the connector ignores keys.”
↩︎ Exam trap 3“the key.converter parameter in the connector configuration properties must be set to org.apache.kafka.connect.storage.StringConverter; otherwise, the connector ignores keys.”
↩︎ Checkpoint - 4.https://docs.snowflake.com/en/user-guide/snowpipe-streaming/snowpipe-streaming-classic-kafkaOfficial docs
“After the Kafka buffer flush time is reached, data will be sent with one second latency to Snowflake through Snowpipe Streaming.”
↩︎ Ingestion method and buffer flushing“If cost is a greater concern than latency, you could increase the buffer flush time.”
↩︎ Ingestion method and buffer flushing“Number of records buffered in memory per Kafka partition before ingesting to Snowflake.”
↩︎ Ingestion method and buffer flushing“Note that setting this property to true makes buffer.flush.time and buffer.count.records irrelevant.”
↩︎ Ingestion method and buffer flushing“This delivery guarantee is set by default for the Kafka connector with Snowpipe Streaming.”
↩︎ Ingestion method and buffer flushing