-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RUN SCRIPT - Provide way to wait for a stream/topic to exist before continuing #2880
Comments
@vcrfxia since you asked about this on Slack I'm tagging you here :) Here's an example of the problem. When I run it this happens:
If I re-run the same thing straight after, it works (because the topic now exists):
/cc @MichaelDrogalis this is always what I was trying to describe on our call yesterday :) |
Two things:
From looking at your scripts, you've separated the CSAS and CT into two separate script files. I haven't gotten a chance to dig into the code to see whether that would make a difference or not yet, but I'm curious to know whether your commands work when they're submitted as part of the same script, since I believe they should. |
On 5.2.1, I can't get either of these to work. As part of scriptI moved the CT into the first script - it doesn't work:
From CLIFails the first time run:
Works when re-run straight after;
|
I see, apologies for not having read your example carefully enough @rmoff . The troubles you are experiencing are specific to using Avro schema inference (see discussion in #1394). The workaround is to specify the schema for the table yourself, rather than relying on KSQL's schema inference. For example, I have verified that I can submit the following script via
|
I've got a CSAS which writes to a topic on which I want to declare a table. Standard re-key requirement. Problem is if I run the CSAS and CT straight after it, the CSAS hasn't yet populated the topic and the CT fails.
From the interactive CLI I workaround this by using a
SELECT … LIMIT 1
which forces execution to wait until there is a message read from the new stream and therefore the topic exists and my CT will work.But if I bundle this into a script to call with
RUN SCRIPT
it fails because theSELECT
is rejected.How can I automate the deployment of this without having to run it manually from the CLI?
The text was updated successfully, but these errors were encountered: