-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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
How to represent a multi-line string of JSON? #63180
Comments
In your example, the
Surprisingly to me, it produces an error:
|
However, these parameters must be a literal, Array/Map/Tuple of literals, or a combination of them written in ClickHouse syntax. In ClickHouse double quotes ( Setting parameters like this is supported:
If the parameter you are trying to set has some other format then you will have to use String literal. Inside this literal the parameter must be in "escaped" format (https://clickhouse.com/docs/en/interfaces/http#tabs-in-url-parameters). So in your example it would be:
|
@evillique It is ok to require Escaped format in HTTP interface and in command line arguments, because it is the only way to distinguish between a string and NULL. But when the parameter is provided as an explicit string literal, it is questionable. |
Thank you for responding my question. Actually I have a very long JSON where strings are double-quoted(because it is standard JSON format). So if I cannot use multi-line string as parameter nor double-quote in JSON, then it would be inconvenient. |
I have tried more. The RapidJSONParser cannot parse a JSON with single-quoted key, such as {'A':1, 'B':2}. If I use standard JSON format, such as {"A":1, "B":2}, parsing succeeds. |
I want to write a SQL like following:
But the SQL does not work. Is there any approach to do this?
Thank you in advance.
The text was updated successfully, but these errors were encountered: