haoch / flink-siddhi

A CEP library to run Siddhi within Apache Flink™ Streaming Application (Not maintained)
Apache License 2.0
243 stars 96 forks source link

Getting error "no viable alternative at input" #62

Closed san213 closed 4 years ago

san213 commented 4 years ago

I have a rule like this defined.

"from inputstream[ data contains 'x' ] select data insert into outputstream;"

Can you please help me in understanding what is the error here?

Exception:

Caused by: io.siddhi.query.compiler.exception.SiddhiParserException: Error between @ Line: 1. Position: 0 and @ Line: 1. Position: 63. Syntax error in SiddhiQL, no viable alternative at input 'inputstream[ data contains'. at io.siddhi.query.compiler.internal.SiddhiErrorListener.syntaxError(SiddhiErrorListener.java:36) at org.antlr.v4.runtime.ProxyErrorListener.syntaxError(ProxyErrorListener.java:41) at org.antlr.v4.runtime.Parser.notifyErrorListeners(Parser.java:544) at org.antlr.v4.runtime.DefaultErrorStrategy.reportNoViableAlternative(DefaultErrorStrategy.java:310) at org.antlr.v4.runtime.DefaultErrorStrategy.reportError(DefaultErrorStrategy.java:136) at io.siddhi.query.compiler.SiddhiQLParser.query_input(SiddhiQLParser.java:2818) at io.siddhi.query.compiler.SiddhiQLParser.query(SiddhiQLParser.java:2718) at io.siddhi.query.compiler.SiddhiQLParser.execution_element(SiddhiQLParser.java:510) at io.siddhi.query.compiler.SiddhiQLParser.siddhi_app(SiddhiQLParser.java:444) at io.siddhi.query.compiler.SiddhiQLParser.parse(SiddhiQLParser.java:178) at io.siddhi.query.compiler.SiddhiCompiler.parse(SiddhiCompiler.java:73) at org.apache.flink.streaming.siddhi.utils.SiddhiExecutionPlanner.parse(SiddhiExecutionPlanner.java:77) at org.apache.flink.streaming.siddhi.utils.SiddhiExecutionPlanner.getStreamPartitions(SiddhiExecutionPlanner.java:249) at org.apache.flink.streaming.siddhi.router.AddRouteOperator.handleExecutionPlan(AddRouteOperator.java:161) at org.apache.flink.streaming.siddhi.router.AddRouteOperator.handleMetadataControlEvent(AddRouteOperator.java:123) at org.apache.flink.streaming.siddhi.router.AddRouteOperator.processElement(AddRouteOperator.java:62) at org.apache.flink.streaming.runtime.io.StreamInputProcessor.processInput(StreamInputProcessor.java:202) at org.apache.flink.streaming.runtime.tasks.OneInputStreamTask.run(OneInputStreamTask.java:105) at org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:302) at org.apache.flink.runtime.taskmanager.Task.run(Task.java:711) at java.base/java.lang.Thread.run(Thread.java:830)

faf-xff commented 4 years ago

Syntax error

If you have any questions about this syntax, please refer to https://siddhi.io/en/v5.1/docs/api/latest/#concat-function

san213 commented 4 years ago

Thank you for the revert. I need one more help. With reference to CEPPipeline.scala example. Can you please share an example control event data format to be pushed to kafka?