Skip to content

Cannot parse object when I use fastjson to write a table  #946

@jetliu1711

Description

@jetliu1711

Hello,I have question with use fastjson to write a table ,table data type is Object('json'),but it make error like this:
ru.yandex.clickhouse.except.ClickHouseException: ClickHouse exception, code: 117, host: 127.0.0.1, port: 8123; Code: 117. DB::Exception: Cannot parse object: (at row 1)
:
Row 1:
Column 0, name: groupID, type: String, parsed text: "00001"
Column 1, name: shopID, type: String, parsed text: "1010"
Column 2, name: reportDate, type: Date, parsed text: "1970-01-01"
Column 3, name: orderKey, type: String, parsed text: "1"
Column 4, name: shopName, type: String, parsed text: ""
Column 5, name: json_data, type: Object('json'), parsed text: "{ QUOTE>makeFinishStatus:0,cancelFoodAmount:0,foodVipPrice:0,foodCode:550A0002,sendBy:},{foodPayPriceReal:0,isSFDetail:1,isBatching:0,foodSendAuthorizer:,finalSugarContent:0,clientType:0,reportDate:20220405,areaName:快餐区,setFoodRemark:,action:1,foodDiscountRate:10,tableID:0,makeEndfoodNumber:0,takeMoney:,foodPractice:,salesCommission:0,saasOrderKey:,foodSendNumber:0,transferOperator:,addFoodFlag:0,foodSubType:堂食,sendTime:0,makeStartTime:0,foodRealAmount:0,makeCallCount:0,setFoodCategoryName:饮品,unitAdjuvantNumber:0,basketName:,makeEndNumber:0,unitAdjuvant:,actionTime:20220405083631,promotionIDLst:,orderBy:123|余婷,setFoodPriceAmount:0,foodCategoryCode:SAP3,isSameOrderActionBathcNo:,foodRemark:,kdsSplitProductCode:0,lastMakeTime:0,foodKey:5f74a1ce-6655-4166-a647-dedf6e497390,serveConfirmTime:0,cancelReason:,seatNo:0,modifyReason:,isSplit:false,propertyList:,makeEndTime:0,makeBy:,targetWcDevice:-1,itemKey:23b91ff0-8aad-435a-9b88-800230ea1347,makingMethod:0,foodCancelAuthorizer:,createTime:20220405083549,foodProPrice:0,foodCategoryGroupName:,foodRealPrice:0,foodNumber:1,parentItemKey:19fadc67-398c-45f8-93a2-9a238cb5efa6,actionBatchNo:d40afb6a1ac74d469a659a828fb1b304,isTempFood:0,lastRemindTime:0,thirdDeviceNo:,foodBarCode:,readyNumber:0,itemDetail<SINGLE }}"ERROR
Code: 117. DB::Exception: Cannot parse object. (INCORRECT_DATA) (version 22.5.1.2079 (official build))

: While executing ParallelParsingBlockInputFormat. (INCORRECT_DATA) (version 22.5.1.2079 (official build))

at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:60)
at ru.yandex.clickhouse.except.ClickHouseExceptionSpecifier.specify(ClickHouseExceptionSpecifier.java:30)
at ru.yandex.clickhouse.ClickHouseStatementImpl.checkForErrorAndThrow(ClickHouseStatementImpl.java:1094)
at ru.yandex.clickhouse.ClickHouseStatementImpl.sendStream(ClickHouseStatementImpl.java:1056)
at ru.yandex.clickhouse.ClickHouseStatementImpl.sendStream(ClickHouseStatementImpl.java:1022)
at ru.yandex.clickhouse.ClickHouseStatementImpl.sendStream(ClickHouseStatementImpl.java:1015)
at ru.yandex.clickhouse.ClickHousePreparedStatementImpl.executeBatch(ClickHousePreparedStatementImpl.java:382)
at ru.yandex.clickhouse.ClickHousePreparedStatementImpl.executeBatch(ClickHousePreparedStatementImpl.java:365)
at com.hualala.com.Demo_json.main(Demo_json.java:1048)

Caused by: java.lang.Throwable: Code: 117. DB::Exception: Cannot parse object: (at row 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions