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: 1 comment 1 reply
-
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.
Hi @plewam,
This error means that when
ClickHouse.Client
tried toSELECT * LIMIT 0
data from target table to determine column types, CH returnedTuple(_)
instead ofJson
type 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