You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a select operation is performed using the query() function, an exception is thrown if the result contains complex JSON format.
Steps to reproduce
create a JSON table
CREATETABLEIF NOT EXISTS test_table (id Int32, json JSON) ENGINE = MergeTree() ORDER BY id;
insert the complex data
:) select * from test_table Format JSONEachRow;
{"id":2,"json":{"content":"This is a description of the book","metadata":{"Author":"test","Number of pages":"","Title":"title","Year of Original Publication":"","Year of Publication":"2023"}}}
use query() function failed
res=client.query("SELECT * FROM test_table")
clickhouse_connect.driver.exceptions.InternalError: Unrecognized ClickHouse type base: ofpages`String name: ofpages`String
The text was updated successfully, but these errors were encountered:
This bug is related to having spaces in your keys ('like a key of Number of pages). ClickHouse parses that as a tuple element. I'll see if I can improve the parser to handle that correctly, but the quickest workaround is to not use keys with spaces.
Describe the bug
When a select operation is performed using the
query()
function, an exception is thrown if the result contains complex JSON format.Steps to reproduce
query()
function failedThe text was updated successfully, but these errors were encountered: