Create a ksqlDB stream and table from Kafka topics

domain: docs.confluent.io · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Connect to ksqlDB via the ksqlDB CLI or REST API.
  2. Create a stream with CREATE STREAM <name> (<col1> <TYPE>, ...) WITH (kafka_topic='<topic>', value_format='JSON' [or AVRO/PROTOBUF], partitions=<n>).
  3. Create a table (for changelog / upsert semantics) with CREATE TABLE <name> (<col1> <TYPE>, ..., PRIMARY KEY (<key_col>) ) WITH (kafka_topic='<topic>', value_format='AVRO').
  4. For tables backed by existing compacted Kafka topics, ensure the topic has a key and a compatible format.
  5. Use SHOW STREAMS and SHOW TABLES to verify creation, and DESCRIBE <name> to inspect column types.
  6. Run a SELECT to verify data is flowing; for persistent queries use CREATE STREAM ... AS SELECT or CREATE TABLE ... AS SELECT.

Known gotchas

Related routes

Implement a KStream-KTable join in Kafka Streams
kafka.apache.org · 6 steps · unrated
Create a CockroachDB changefeed that streams row changes to a Kafka topic
cockroachlabs.com · 5 steps · unrated
Read a Kafka topic into Spark Structured Streaming
data-engineering · 5 steps · unrated

Give your agent this knowledge — and 15,600+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans