Skip to content
Advertisement

I am getting this error on inserting data in ClickHouse

Unknown error field: Code: 27. DB::ParsingException: Cannot parse input: expected ‘”‘ before:
’40”,”gmtoffset”:0,”open”:109.6,”high”:109.6,”low”:109.6,”close”:109.6,”volume”:0,”previousClose”:108.4,”change”:1.2,”change_p”:1.107}n’: (while reading the value of key timestamp): While executing JSONEachRowRowInputFormat: (at row 1). (CANNOT_PARSE_INPUT_ASSERTION_FAILED) (version 21.11.5.33 (official build))]

Create table query is simple

insert query:

Advertisement

Answer

The type of column ‘previousClose’ is ‘Int32’, but the value in realTime is the float type.

I tried your problem with clickhouse java jdbc driver. Change the value of ‘previousClose’ to 108, then it work fine.

And this is my java code:

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement