RUN SCRIPT statement in ksqlDB for Confluent Platform
Synopsis
RUN SCRIPT <path-to-query-file>;
Description
You can run a list of predefined queries and commands from in a file by using the RUN SCRIPT command.
The RUN SCRIPT command supports a subset of ksqlDB statements:
Persistent queries:
SET, UNSET statements
INSERT INTO statement
The RUN SCRIPT doesn’t support statements such as:
SHOW TOPICS and SHOW STREAMS, etc.
TERMINATE
Non-persistent queries: SELECT, etc.
RUN SCRIPT is only available from the ksqlDB command line.
Example
The following statement runs the queries in the file located at
/local/path/to/queries.sql.
RUN SCRIPT '/local/path/to/queries.sql';