Create a stream with CREATE STREAM <name> (<col1> <TYPE>, ...) WITH (kafka_topic='<topic>', value_format='JSON' [or AVRO/PROTOBUF], partitions=<n>).
Create a table (for changelog / upsert semantics) with CREATE TABLE <name> (<col1> <TYPE>, ..., PRIMARY KEY (<key_col>) ) WITH (kafka_topic='<topic>', value_format='AVRO').
For tables backed by existing compacted Kafka topics, ensure the topic has a key and a compatible format.
Use SHOW STREAMS and SHOW TABLES to verify creation, and DESCRIBE <name> to inspect column types.
Run a SELECT to verify data is flowing; for persistent queries use CREATE STREAM ... AS SELECT or CREATE TABLE ... AS SELECT.
Known gotchas
ksqlDB stream vs. table semantics map directly to Kafka append log vs. compacted changelog; choosing the wrong abstraction leads to incorrect query results.
The PRIMARY KEY column in a CREATE TABLE must match the Kafka message key; if the key and value key differ, results will be wrong.
Format and schema must match between the ksqlDB DDL and the actual topic data; format mismatches produce deserialization errors rather than empty results.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp