Skip to content

Persistent Queries

Persistent Queries (per PersistentQueryType) can be the following queries:

When Analyzer is requested to analyze a query it creates a Visitor with a flag to indicate whether the sink is defined or not for persistent queries.


CREATE_SOURCEs don't write to a topic (so EngineExecutor does not have to check for read-only topics the other query types could attempt to write to).

It is forbidden to terminate CREATE_SOURCE queries when linked to a source table (and ValidatedCommandFactory throws a KsqlStatementException):

Cannot terminate query '[queryId]' because it is linked to a source table.

EngineExecutor will not execute CREATE_SOURCE plans when ksql.source.table.materialization.enabled is disabled and prints out the following INFO message to the logs instead:

Source table query '[statementText]' won't be materialized because 'ksql.source.table.materialization.enabled' is disabled.

CREATE_SOURCE is used when: