Insert JSON string via BulkCopyInterface #311
-
|
Hello @DarkWanderer, Fist of all thank you very much for this beautiful clickhouse client. I got a question around the JSON column type. I would like to insert a json string into clickhouse. However when I do this, I get below exception: The exception itself is quite clear, I assume you library expects a tuple as data type. However I got the data present as a json string. Have you have any experience with this or any trick I can use to make it work? Kind regards, Mathis |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
|
Hi @plewam, This error means that when As a workaround, you can create a Materialized View which writes into target table and maps String to Json See also #243 |
Beta Was this translation helpful? Give feedback.
-
|
@DarkWanderer As JSON now is supported since the latest version do you have a rough documentation available what I need to do in order to insert json data? |
Beta Was this translation helpful? Give feedback.
Hi @plewam,
This error means that when
ClickHouse.Clienttried toSELECT * LIMIT 0data from target table to determine column types, CH returnedTuple(_)instead ofJsontype for this column. Json support is experimental in ClickHouse itself, so the API has not yet stabilized - not much I can do about it client-side.As a workaround, you can create a Materialized View which writes into target table and maps String to Json
See also #243