Clickhouse - Multi-statements are not allowed errors. How to debug?

Issue Summary

Some queries to Clickhouse returns an error like the following:

Error running query: **Code: 62, e.displayText() = DB::Exception: Syntax error (Multi-statements are not allowed): failed at position 774 (end of query) (line 19, col 25): ; FORMAT JSON. (version (official build))**

I’m not sure why is this happening when all the query I tried works fine when using Clickhouse HTTP interface done via curl or using the Clickhouse client.

How can I view the full query that Redash is sending to Clickhouse?

Technical details:

I don’t think it’s a bug. This sounds like expected behavior for Clickhouse.

I searched your stack trace and found this:

It seems Clickhouse can’t support multi-statements without special client configuration.

Look at your query editor. What you see is sent as-is to the database. You can step through it manually using a development environment described in our developer guide.

Perhaps the query runner can be updated to support multi-statements? This isn’t something we can do internally since we don’t have a CH instance to test against.

1 Like