Skip to main content
How-to guideApplies to: Unified engine deployments
A source defines a connection and the columns a pipeline can read. This page uses Kafka with JSON records. Complete Before you start before registering it.

Register a Kafka source

If you already ran the walkthrough, orders_source is registered. Reuse it in transformations. Otherwise, edit the connection values and run this declaration once.
The result contains a table_id and accepted: true. This saves the connector definition. Records are consumed when a pipeline using it starts.

Match the message schema

The declaration above reads JSON objects like this one:
Field names and value types must match the declared columns. BIGINT holds whole-number IDs, DOUBLE holds amounts, and TEXT holds strings. The walkthrough uses JSON objects with fixed columns. Avro and Protobuf need their own matching format and schema settings.

Choose offsets and read mode

The offset option chooses a starting position when no saved Streaming checkpoint is being restored. Resuming the same pipeline uses its checkpointed offsets. Creating a different pipeline with earliest can read the retained records again. For group, use the explicit group ID whose stored offsets you intend to read. Share a consumer group only when that sharing is part of your Kafka design.

Connect with SASL

SASL is Kafka’s authentication mechanism. This alternative uses a secured broker and worker environment variables for its username and password. It registers a separate source; use this source name in your pipeline query.
Choose the protocol and mechanism accepted by your broker. The {{ KAFKA_USERNAME }} and {{ KAFKA_PASSWORD }} references use the Streaming connector’s environment expansion. Supply those variables to the Streaming processes that resolve the connection, including its workers. They are separate from Unified secret or credential names. For AWS MSK IAM authentication, use the following option fragment inside a source declaration. It uses the runtime’s AWS identity, with an optional assumed role.

Use the source in a pipeline

The FROM clause names the registered source. The target sink must also be registered. Your first pipeline shows the complete script. In the current Kafka connector, type must be source. Use an Iceberg sink for the destination shown in these examples.

Clean up

Stop and remove pipelines that use the source before removing its connector definition through the existing table controls. Removing a connector definition does not delete its Kafka topic.
Last modified on November 4, 2026