Closed ybyzek closed 5 years ago
it would be good if the error message included how to fix the problem
@ybyzek do you know if this is still an issue in the latest builds? I can see this is from a few months back.
@rmoff yes it is still an issue.
A related issue is https://github.com/confluentinc/ksql/issues/1320 (KSQL in headless mode doesn't do the same validation on input queries as the interactive mode).
Update 2018-11-12: https://github.com/confluentinc/ksql/issues/1320 has been fixed since.
cc @big-andy-coates, this is related to what @apurvam wrote at https://github.com/confluentinc/ksql/issues/1544#issuecomment-437482000:
@big-andy-coates assigning this to you since you are already looking into this problem. It would be good to unify the behavior of multiline statements across modes as well. Right now, I think they are supported in the CLI, but what about in run script and in non-interactive mode?
With the above PR the CLI itself handles run script
commands by loading the file contents and posting to the rest endpoint as a normal (multi-line) request. So the statements are handled like any other statements sent via the CLI.
I've also extended the rest API to support SET
and UNSET
commands within multi-line requests. The commands only affect properties within the scope of the request itself, i.e. within the scope of the script.
@ybyzek, is you have the time I'd love for you to test this out and make sure you're happy with the functionality and there aren't any edge cases I've not thought of.
Thanks,
Andy
@big-andy-coates wonderful! I'm happy to validate, let's sync offline on logistics to validate.
When you create a new stream by reading from a Kafka topic with Avro-formatted messages, you don't have to define columns or data types in the CREATE statement....if you are interacting via the CLI.
However, if you are putting these commands in a script that you then pass in via queries-file, then I think you do.
These commands passed in via
RUN SCRIPT
work:These commands passed in via
RUN SCRIPT
do not work:Error: