Closed miguno closed 6 years ago
Related to https://github.com/confluentinc/ksql/issues/1017.
EDIT: Pls ignore, I discovered there is an open issue already.
Hi,
I'm using version 5.0.0.
For a simple test, try creating a file with a single line: set 'auto.offset.reset'='earliest';
RUN SCRIPT throws:
ksql> RUN SCRIPT 'scripts/set.ksql';io.confluent.ksql.util.KsqlException: Unable to find ddl command factory for statement:class io.confluent.ksql.parser.tree.SetProperty valid statements:[class io.confluent.ksql.parser.tree.DropTable, class io.confluent.ksql.parser.tree.RegisterTopic, class io.confluent.ksql.parser.tree.DropStream, class io.confluent.ksql.parser.tree.CreateTable, class io.confluent.ksql.parser.tree.CreateStream, class io.confluent.ksql.parser.tree.DropTopic]
Pushing the SET out of the file works, for example:
ksql> set 'auto.offset.reset'='earliest'; RUN SCRIPT 'scripts/test.ksql';Successfully changed local property 'auto.offset.reset' from 'null' to 'earliest'
Message
---------
---------
@doctor-pi I've logged a new issue for this: https://github.com/confluentinc/ksql/issues/1861 for
We have no documentation of
RUN SCRIPT
(I checked syntax guide, examples), even though we use it in e.g. the clickstream demo.RUN SCRIPT
allows you to run a list of predefined queries/commands from in a file.Example usage:
Note that, today,
RUN SCRIPT
will only execute a subset of possible KSQL commands:1) CS/CT/CTAS/CSAS (= persistent queries) 2) DROP STREAM, DROP TABLE 3) SET
RUN SCRIPT
does NOT execute command such as:4) SHOW TOPICS, SHOW STREAMS, etc. 5) TERMINATE 6) SELECT ... (= non-persistent queries)