Maurizio Cimino
Maurizio Cimino

Reputation: 135

KSQL query and tables storage

I was looking for a documentation about where KSQL storage querys and tables. For example, since KSQL was built to work with Kafka, when I create a table from a topic, or when I write a query, where are stored the tables or the query results? More specifically, does KSQL use some kind of pointers to events inside segments inside the topic partitions, or it duplicates the events when I create a table from a topic, for example?

Upvotes: 2

Views: 1251

Answers (1)

OneCricketeer
OneCricketeer

Reputation: 191743

The queries that have been ran or are active are persisteted back into a Kafka topic.

A Select statement has no persistent state - it acts as a consumer

A Create Stream/Table command will create potentially many topics, resulting in duplication, manpulation, and filtering of the input topic out to a given destination topic. For any stateful operations, results would be stored in a RocksDB instance on the KSQL server(s).

Since KSQL is built on Kafka Streams, you can refer to the wiki on Kafka Streams Internal Data Management

Upvotes: 3

Related Questions