flink任务中json格式导入出现两种错误

【详述】flink 中使用json格式导入,出现以下两种错误
【背景】json对象转json string
【业务影响】无法入库
【StarRocks版本】例如:2.2
【集群规模】例如:3fe(1 follower+2observer)+3be(fe与be混部)
【机器信息】16c64g
【附件】
错误展示: Fail",“BeginTxnTimeMs”:0,“Message”:“Failed to parse json as array. error: Within strings, some characters must be escaped, we found unescaped characters”
排查发现出现上述错误的字段为:

后面我将所有入库的数据进行了转译,又出现如下错误

错误展示:“Status”:“Fail”,“BeginTxnTimeMs”:0,“Message”:“Unrecognized json format, stop json loader.”,"
转译后的格式

请问针对这种情况该如何处理?

应该是\引起的数据转义导致识别字段内容错误,可以考虑数据清洗下

尝试过了 还是不行,报错“Status”:“Fail”,“BeginTxnTimeMs”:0,“Message”:“Unrecognized json format, stop json loader.”

同时还有其他问题,sr的报错中没有具体说明是哪一条数据有问题,后续能否支持?
{“Status”:“Fail”,“BeginTxnTimeMs”:0,“Message”:“Failed to parse json as array. error: A string is opened, but never closed.”,“NumberUnselectedRows”:0,“CommitAndPublishTimeMs”:0,“Label”:“27da65cf-340b-4c8e-a350-662968d455e2”,“LoadBytes”:5285301,“StreamLoadPutTimeMs”:5,“NumberTotalRows”:0,“WriteDataTimeMs”:149,“TxnId”:572743,“LoadTimeMs”:188,“ReadDataTimeMs”:6,“NumberLoadedRows”:0,“NumberFilteredRows”:0}
{}

看着json格式不正确,把数据粘贴出来,找个页面看看能不能正确解析?

第一个标黄的那个是可以正常解析的,也是fast json 转jsonstring之后的数据,但是sr无法解析

有无特殊字符?我之前使用stream load发生过类似json格式不对的问题,但是json格式反复校验没有任何问题,但是有个特殊字符unicode码应该是超过了sr表示的范围,去掉就可以。

{
“login_id”: “201801242143210260084685”,
“lib”: {
“$lib”: “Android”,
“$lib_method”: “code”,
“$lib_version”: “4.3.4”,
“$lib_detail”: “com.sensorsdata.analytics.android.sdk.SensorsDataAPI##trackEvent##SensorsDataAPI.java##2996”,
“$app_version”: “6.6.6”
},
“nginx_time”: 1658121892453,
“project”: “production”,
“type”: “track”,
“_track_id”: 1403601834,
“distinct_id”: “201801242143210260084685”,
“anonymous_id”: “56c1786f55dcd33c”,
“_flush_time”: 1658121892788,
“time”: 1658121881098,
“event”: “pay_channel7”,
“properties”: {
“ins_nm”: “喜萬年大廈”,
“bus_line”: “null”,
“$os”: “Android”,
“$longitude”: 113546404,
“$wifi”: true,
“$network_type”: “WIFI”,
“$ip”: “60.246.41.65”,
“$screen_height”: 2400,
“$user_agent”: “Dalvik/2.1.0 (Linux; U; Android 12; IN2013 Build/RKQ1.211119.001)”,
“now_aomi_vip”: true,
“page_id”: “null”,
“$device_id”: “56c1786f55dcd33c”,
“platform_type”: “Android”,
“$app_id”: “1”,
“big_order_id”: “T20220718132347998416”,
“$latitude”: 22201411,
“raw_data”: “{“params”:”{\“tmerID\”:\“011904991747\”,\“amount\”:\“9780\”,\“curType\”:\“081\”,\“orderid\”:\“PR20220718132357783743\”,\“appCustID\”:\“201801242143210260084685\”,\“dse_locale\”:\“zh-CN\”,\“merAcct\”:\“0119100200003635980\”,\“token\”:\“15081829876797381950\”,\“openUrl\”:\“https://opay.icbc.com.cn\”,\“merSignMsg\”:\“jioePhkuV8EgFVwRoFMDiUU+yHHDP0iha/NOwGoYYXZ+RtM6cZn/eZJopqqwCp5YlRKcS071ZOzT\\naFVtYdGdziZwH5ZuNefsuv2C/zlefhlf3qx4TGl8cuTH6VKKCR0+9WaSbDDQt98NSZTFhIJ4BYCk\\ngvH69gCSXImJGSbofto\u003d\”,\“merURL\”:\"https://aomiapi.aomipay.com/aomi-payservice/pay/callback/icbcsdk\",\“areaCode\”:\“0119\”,\“appID\”:\“10000000000002776500\”,\“merCert\”:\“MIIDJTCCAg2gAwIBAgIKTHDKECMLByJTeTANBgkqhkiG9w0BAQUFADA+MR0wGwYDVQQDExRJQ0JDIFBlcnNvbmFsIFN1YiBDQTEdMBsGA1UEChMUcGVyc29uYWwuaWNiYy5jb20uY24wHhcNMjEwNTIwMTEyODA5WhcNMjYwNTIwMTU1OTU5WjBOMR4wHAYDVQQDDBUwMTE5RUMyMDA0OTc5My5lLjAxMTkxDTALBgNVBAsMBDAxMTkxHTAbBgNVBAoMFHBlcnNvbmFsLmljYmMuY29tLmNuMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJHzdsp63LaDZwHBbiTY2YXZMfbDDRB3NC2e8AD2ZrJqO7fXN4iQHx85B2Gqg7y4xGUUsamdxTAOC4+6VOX3NXoR9G7jltQtFfPEYqo7bqIsDhb4DH5L6jP7A7t2XcyXL9mFt+PIKiodGHF2ctkO8F1FxEwSKLnJbfMkMbdZmmkwIDAQABo4GYMIGVMB8GA1UdIwQYMBaAFB8NtRjTePuebb6FA7Kp9p0t/aR2MFMGA1UdHwRMMEowSKBGoESkQjBAMREwDwYDVQQDDAhjcmwyMzkzOTEMMAoGA1UECwwDY3JsMR0wGwYDVQQKDBRwZXJzb25hbC5pY2JjLmNvbS5jbjAdBgNVHQ4EFgQUlo5XLN6cQSQ/O7O0Z8GD2uSn5xcwDQYJKoZIhvcNAQEFBQADggEBAHT8JLVhWlsCA/XkLwQNUtjLka8oD+laPks6jOPFYkXQldu9zWc1fmcEwJ3F+BG6dYH3WJV5P9oFgf7nckxVtzolbKS+rko73fAAET1TUFms3raeLQep0IJdXbBOjCBVud60Jfb4v08E16jyDytV61/MORgADOGSguJFd9uQFlxGHQCjpfD2r2b6ORCausyuizzJu8Jz7wT7fSHYf3zcuHiNgVOnd7Izx5qF3XjEFp2mLmcEaGERMSqbQP07PgR7rQH0XOJGerMP5QQhLje6Zd/3pzRgPG6WOvRVacZqEboFo77Rqkh1SH1I++DS9SvnnWhpYO5AVApoAicYj98ya30\u003d\”,\“merID\”:\“0119EC20049793\”,\“orderDate\”:\“20220718132358\”,\“goodsName\”:\“新华顺咖啡花雕鸡濑粉\”}",“payType”:“ICBCTotalSdkPay”,“url”:""}",
“$carrier”: “Hutchison Telephone Co. Ltd”,
“$os_version”: “12”,
“$is_first_day”: false,
“$model”: “IN2013”,
“$screen_width”: 1080,
“Land_page_flg”: false,
“$app_version”: “6.6.6”,
“$lib”: “Android”,
“from_page_id”: “70000031”,
“$app_name”: “澳覓”,
“$lib_version”: “4.3.4”,
“$timezone_offset”: -480,
“channel_id”: “43”,
“$manufacturer”: “OnePlus”
}
}

我们已经替换掉 回车 换行 这类符号了

大佬 如何去匹配去掉?

\u003d去掉或者转义一下\u003d

请问问题解决了嘛

可以单独开个帖子描述下您使用的版本,和问题具体现象和报错。

好的,谢谢

单独开了哈, flink写入starrocks报错,但是去掉检查点生成后没有报错。