ksql
ksql copied to clipboard
control-center doesn't quote stream names in websocket queries, "Error parsing query: line 1:19: Syntax error at line 1:19"
Describe the bug
The Control-Center displays a Flow of data through tables and streams, and upon clicking on any item, it displays a side panel that aims to show the contents, but the query to /ws/query does a simple "select * from %s emit changes", and that fails if the table or stream needs to be quoted.
To Reproduce
- Create a stream with a hyphen in the name. "create stream `foo-bar` as select 'hi' as t from other;"
- Visit the control-center, ksqlDB, and your cluster, and "data-flow".
- Click on your new stream in the graph.
- See a failure,
{"error":"Error parsing query: line 1:19: Syntax error at line 1:19"} - See the developer console to see the query text,
{"ksql":"select * from foo-bar EMIT CHANGES;","streamsProperties":{"auto.offset.reset":"earliest"}}, which has an invalid ksql query.
Sorry if this is the wrong project. Please reassign. The code organization is bewildering to outsiders, and nothing is called "control center" or close to it.