Closed debian-testing closed 2 years ago
Because of https://github.com/TimonKK/clickhouse/issues/102
You can just append WITH 1 as a
to your select query.
Thank you, works perfectly! (until #102 fixed...)
For reference: ClickHouse.opts.raw=true
is required to properly receive the formatted results.
I am trying to use other formats, for example,
FORMAT PrettyCompact
to write to a file for reporting, however, the queries fail becauseFORMAT JSON;
is being appended to the query after.I read the docs, tried the
format
andraw
options, tried removing the format options, setting it to null, etc., but no success.There is code to process the
FORMAT
option, but I wasn't able to see any way to deactivate the postfixing ofFORMAT JSON;
without changing the source of this library.Is there a way? Any ideas?
Test code (works directly in clickhouse-client)
Error:
Syntax error: failed at position 25: PrettyCompact FORMAT JSON;
Version:
clickhouse@2.4.2