A base table is a ksqlDB table created directly against a backing Kafka topic, exposing keyed records for queries. Its primary key identifies the table row. section 11.4
Configure a base table by:
- Declaring the Kafka key as a typed PRIMARY KEY column. section 11.4
- Setting key and value formats, such as KAFKA and JSON, in the WITH clause. section 11.4
- Treating records with the same key as updates and null values as tombstones. section 11.4
User activity table
CREATE TABLE user_activity_table (user_id INT PRIMARY KEY, first_name VARCHAR, last_name VARCHAR, activity VARCHAR, event_time VARCHAR, steps INT) WITH (kafka_topic='user_activity', key_format='KAFKA', value_format='JSON');
