写到本地的文件发出来看看,另外flink sink的配置发下
StarRocksSinkOptions starRocksSinkOptions = StarRocksSinkOptions.builder()
.withProperty(“connector”, “starrocks”)
.withProperty(“jdbc-url”, prop.getProperty(“jdbc-url”))
.withProperty(“load-url”, prop.getProperty(“load-url”))
.withProperty(“username”, prop.getProperty(“username”))
.withProperty(“password”, prop.getProperty(“password”))
.withProperty(“table-name”, tableName)
.withProperty(“database-name”, prop.getProperty(“dataBaseName”))
.withProperty(“sink.properties.format”, “json”)
.withProperty(“sink.properties.strip_outer_array”, “true”)
.withProperty(“sink.buffer-flush.interval-ms”, “2000”)
.withProperty(“sink.version”, “v1”)
.build();
数据没有写到文件中,我拿来一条操作的
{“task_id”: “20240227”, “keyword”: “”, “keyword2”: “”, “data_type”: “jd_comment”, “spider_time”: 1709088149, “platform”: “3”, “data”: {“jwotestProduct”: “”, “score”: 0, “comments”: [{“id”: 19307482520, “guid”: “ebd2e0e09561f04f51d83d48adca9cab”, “content”: “灵敏度:操作灵活,非常灵敏\n准确性:走时,监测数据很准确\n操作难易:操作简单,很容易\n做工质量:做工精细\n外形外观:外观漂亮,家人喜欢\n其他特色:款式新颖,功能齐全,满足需求,设计精美,非常喜欢,支持华为。”, “vcontent”: “{$%&灵敏度:&%$}操作灵活,非常灵敏\n{$%&准确性:&%$}走时,监测数据很准确\n{$%&操作难易:&%$}操作简单,很容易\n{$%&做工质量:&%$}做工精细\n{$%&外形外观:&%$}外观漂亮,家人喜欢\n{$%&其他特色:&%$}款式新颖,功能齐全,满足需求,设计精美,非常喜欢,支持华为。”, “creationTime”: “2023-07-06 10:05:43”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1235719026, “commentId”: 19307482520, “venderId”: 0, “content”: “HUAWEI 手环 8 拥有超轻薄机身仅8.99 毫米,再次刷新华为穿戴产品纤薄纪录,机身重量14g,佩戴轻盈无感,更舒适。感谢您对咱们产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-07-06 10:07:49”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 4, “discussionId”: 1314606633, “imageCount”: 3, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “12.0.4”, “images”: [{“id”: -2093860485, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/215370/15/32929/28138/64a62175Fbfa85801/4560bcf228377498.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: -2093860484, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/100687/6/24925/29445/64a62175F5d207ed9/1156f73298d5bca5.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: -2093860483, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/109775/36/42335/39699/64a62176F9e1aa515/63dbc5291d2ee20a.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “山东”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-06-30 21:25:01”, “nickname”: “过郡", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 6, “afterDays”: 0}, {“id”: 19127729618, “guid”: “5ab30412e6effc71437412a41d792ac6”, “content”: “老公在实体店买了一个,很实用,心率血氧这些都有,要送一个给我,我在网上买了同款,价格比实体店便宜,而且京东会员本身就可以用券,很划算”, “creationTime”: “2023-05-19 22:28:06”, “isDelete”: false, “isTop”: false, “userImageUrl”: “storage.360buyimg.com/i.imageUpload/43616c6d526561736f6e31343437323133313638363338_sma.jpg”, “topped”: 0, “replies”: [{“id”: 1215809458, “commentId”: 19127729618, “venderId”: 0, “content”: “华为手环 8基于HUAWEI TruSeen™ 5.0 硬件光路升级与智能节电算法,支持血氧自动检测,记录血氧变化,支持全天候智能心率监测及异常提醒,新增7天静息心率及变化曲线,帮你及时了解身体状态,感谢您对此产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-05-25 08:53:59”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 3, “userClient”: 2, “discussionId”: 1283121902, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “11.4.4”, “images”: [{“id”: 2141014021, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/88197/18/33650/23819/64678775F77ac2fa4/666608c254051428.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: 2141014022, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/155924/7/37327/14189/64678775Fb32fbfd3/086ee1f7198d6530.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “江苏”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-05-13 23:12:59”, “nickname”: "Cn”, “replyCount2”: 1, “userImage”: “storage.360buyimg.com/i.imageUpload/43616c6d526561736f6e31343437323133313638363338_sma.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 6, “afterDays”: 0}, {“id”: 19528971979, “guid”: “4435f395f0ca12c0ea453e3c2a494763”, “content”: “东西收到了,真的超级喜欢,非常支持!!!!质量非常好,我用着也很舒服,还是感觉非常不错的与卖家描述的完全一致,非常满意,完全超出期望值,京东发货速度非常快,包装非常仔细、严实。很满意!”, “creationTime”: “2023-08-12 20:46:29”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1251727564, “commentId”: 19528971979, “venderId”: 0, “content”: “天高路远,但总会有一个他为您而来,在您期期许许的翘首以待中,给您送来京喜和暖意。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-08-13 08:36:16”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 2, “discussionId”: 1344202230, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “12.0.10”, “images”: [{“id”: -2054552747, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/101824/25/42782/193368/64d77f24F4124f1c8/e5a806682e2d3d49.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: -2054552746, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/130344/6/38113/316576/64d77f24Fe3f3ac6f/6b4f5e3c5b0c24a0.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {“buyCount”: 2}, “location”: “湖北”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-06-13 12:59:38”, “nickname”: “来佳", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 60, “afterDays”: 0}, {“id”: 19185296309, “guid”: “31aa31e238e1363738ded66cd4d8be5b”, “content”: “粉色很好看!第一次用手环感觉很满意,带着没有不舒服,操作顺滑,功能也很足,督促自己多运动少久坐。”, “creationTime”: “2023-06-04 20:38:34”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1220780513, “commentId”: 19185296309, “venderId”: 0, “content”: “HUAWEI 手环 8 拥有超轻薄机身仅8.99 毫米,再次刷新华为穿戴产品纤薄纪录,机身重量14g,佩戴轻盈无感,更舒适。感谢您对咱们产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-06-04 21:02:14”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 2, “discussionId”: 1292571590, “imageCount”: 1, “anonymousFlag”: 1, “plusAvailable”: 0, “mobileVersion”: “12.0.2”, “images”: [{“id”: -2136035757, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/220296/17/29000/51749/647c85c9F55d99d34/01027946e7abee14.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {“buyCount”: 1}, “location”: “广东”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-05-28 11:34:00”, “nickname”: "sa”, “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 7, “afterDays”: 0}, {“id”: 19073391903, “guid”: “c20f3c194d7b6ad6e0961a7d6a25e4bc”, “content”: “非常好用,做工精美,第一次用手环,实用性高,待机时间最少十天以上”, “creationTime”: “2023-05-01 17:06:00”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1206624843, “commentId”: 19073391903, “venderId”: 0, “content”: “HUAWEI 手环8快充升级,强劲续航,充电速度提升30%,45分钟即可充满,感谢您对产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-05-02 08:07:34”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 4, “discussionId”: 1274143664, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 0, “mobileVersion”: “11.4.4”, “images”: [{“id”: 2123747442, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/109471/30/39429/73750/644f80f7Fd41127f1/6a58ca0b5a8a0d4c.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: 2123747443, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/173060/25/36974/86836/644f80f8Fb52d423c/7ee9bdedfda7ab9d.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “樱语粉”, “productSize”: “NFC版”, “textIntegral”: 20, “imageIntegral”: 20, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “广东”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-04-23 15:27:08”, “nickname”: “jq", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 40, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 8, “afterDays”: 0}, {“id”: 19384239842, “guid”: “d18968909c801b78e10e2e58c77c2ced”, “content”: "很好用啊,可以用NFC,解决了我的大问题,烦,也可以监测健康,挺实用的,可以试试!", “creationTime”: “2023-07-30 08:54:55”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1246018823, “commentId”: 19384239842, “venderId”: 0, “content”: “HUAWEI 手环8采用1.47英寸AMOLED 全面屏,佩戴时更加贴合手腕,给予真正的无感佩戴,搭载HarmonyOS与高性能传感器,连接手机配合华为运动健康,在更多设备上畅享卓越体验,感谢您对此产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “storage.360buyimg.com/i.imageUpload/bbaaceaab9d9b7bdc6ecbda2b5ea2dcef5d0a131353630303736363037363232_sma.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-07-30 09:51:58”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 2, “discussionId”: 1327083316, “imageCount”: 1, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “12.0.8”, “images”: [{“id”: -2069600018, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/169046/4/36491/14578/64c5b4deFd525c625/77a956bbd4f1fa51.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 20, “imageIntegral”: 20, “ownId”: 1000004259, “ownType”: 0, “extMap”: {“buyCount”: 1}, “location”: “陕西”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-07-17 13:04:38”, “nickname”: "jb", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 40, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 13, “afterDays”: 0}, {“id”: 19057889988, “guid”: “2e0e22160fe6eb9a1b7da0e4c5c305e1”, “content”: “颜值超高,超级显白的樱花粉!功能特别强大,果断入手,送给闺蜜的生日礼物\uD83C\uDF81,正好生日这天到了,开心!”, “creationTime”: “2023-04-26 13:56:44”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1206513101, “commentId”: 19057889988, “venderId”: 0, “content”: “华为手环 8NFC版采用1.47英寸AMOLED 全面屏配合时尚简洁的立边设计,抬手间,大有精彩,感谢您对此产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-05-01 16:36:54”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 4, “discussionId”: 1271875397, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 0, “mobileVersion”: “11.6.6”, “images”: [{“id”: 2119319687, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/94979/11/37371/27541/6448bd1bF55807a46/487facdd3927b0d7.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: 2119319688, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/150347/4/18730/36571/6448bd1bFee729d76/02a15e3bb12b7ef0.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “樱语粉”, “productSize”: “NFC版”, “textIntegral”: 20, “imageIntegral”: 20, “ownId”: 1000004259, “ownType”: 0, “extMap”: {“buyCount”: 2}, “location”: “辽宁”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-04-21 21:37:30”, “nickname”: "jn", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 40, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 5, “afterDays”: 0}, {“id”: 19382683022, “guid”: “44c0f2aea30b50682d98b5b5f2bcbd3f”, “content”: “送给母亲的礼物,本来担心粉色会不会太少女化了,其实是多虑了,并不是那种土粉色,蛮大众化的粉,功能比上一代智能手表有了新提升,价格也接近,平时测测心率睡眠还是很好用的!”, “creationTime”: “2023-07-29 17:03:18”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1245874707, “commentId”: 19382683022, “venderId”: 0, “content”: “HUAWEI 手环 8 基于HUAWEI TruSeen™ 5.0 硬件光路升级与智能节电算法,支持血氧自动检测,记录血氧变化,支持全天候智能心率监测及异常提醒,新增7天静息心率及变化曲线,帮您及时了解身体状态。感谢您对咱们产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-07-29 18:55:56”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 2, “discussionId”: 1326828400, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “12.0.8”, “images”: [{“id”: -2070087139, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/182855/2/35595/26597/64c4d5d6F9ed497b8/d4985810594ae684.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: -2070087138, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/104104/21/41998/18938/64c4d5d6F679dea87/8ed4320940e9bd7f.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “安徽”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-06-30 11:03:15”, “nickname”: "jy", “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 29, “afterDays”: 0}, {“id”: 19346889608, “guid”: “375a183aaae76d923fbbece92346f254”, “content”: “京东快递配送速度快准时,服务好。这款手表的颜色很好看,外观小巧精致,很适合女生佩戴。运动记录比较准确。作为礼物赠送朋友非常棒!”, “creationTime”: “2023-07-18 15:13:57”, “isDelete”: false, “isTop”: false, “userImageUrl”: “storage.360buyimg.com/i.imageUpload/6a645f5464534e506b564c576d7a7231363332373937333036393236_sma.jpg”, “topped”: 0, “replies”: [{“id”: 1241081142, “commentId”: 19346889608, “venderId”: 0, “content”: “HUAWEI 手环 8 拥有超轻薄机身仅8.99 毫米,再次刷新华为穿戴产品纤薄纪录,机身重量14g,佩戴轻盈无感,更舒适。感谢您对咱们产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-07-19 07:49:26”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 4, “discussionId”: 1321046175, “imageCount”: 2, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “11.8.0”, “images”: [{“id”: -2081441094, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/184626/40/34486/28723/64b63bb4F1f143aad/02adea38cc41420f.jpg”, “imgTitle”: “”, “status”: 0}, {“id”: -2081441093, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/139617/33/37370/76225/64b63bb5Fe0cba11a/3932b575b4be75ed.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 40, “imageIntegral”: 40, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “河南”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-07-13 00:56:52”, “nickname”: "随1", “replyCount2”: 1, “userImage”: “storage.360buyimg.com/i.imageUpload/6a645f5464534e506b564c576d7a7231363332373937333036393236_sma.jpg”, “orderId”: 0, “integral”: 80, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 5, “afterDays”: 0}, {“id”: 19217397410, “guid”: “6e5ab0d138ff89ff5f50214d9e9bdd0b”, “content”: “用了一段时间才来评价,整体还是挺不错的,颜值太高了。测睡眠,测心率很是方便,值得购买”, “creationTime”: “2023-06-12 17:22:59”, “isDelete”: false, “isTop”: false, “userImageUrl”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “topped”: 0, “replies”: [{“id”: 1224684903, “commentId”: 19217397410, “venderId”: 0, “content”: “HUAWEI 手环 8 拥有超轻薄机身仅8.99 毫米,再次刷新华为穿戴产品纤薄纪录,机身重量14g,佩戴轻盈无感,更舒适。感谢您对咱们产品的支持和喜爱。”, “pin”: “华为京东自营官方旗舰店”, “userClient”: 103, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “ip”: “1.85.63.164”, “productId”: 100056777867, “replyList”: [], “nickname”: “华为京东自营官方旗舰店”, “creationTime”: “2023-06-12 17:56:05”, “parentId”: 0, “targetId”: 0, “venderShopInfo”: {“id”: 1000004259, “appName”: “//huawei.jd.com”, “title”: “华为京东自营官方旗舰店”, “venderId”: 1000004259}}], “replyCount”: 1, “score”: 5, “imageStatus”: 1, “usefulVoteCount”: 0, “userClient”: 4, “discussionId”: 1298384661, “imageCount”: 1, “anonymousFlag”: 1, “plusAvailable”: 201, “mobileVersion”: “12.0.4”, “images”: [{“id”: -2124933626, “imgUrl”: “//img30.360buyimg.com/shaidan/s128x96_jfs/t1/89563/4/39595/54007/6486e3f3F7eb8f4c2/0b40b31a6676a5f3.jpg”, “imgTitle”: “”, “status”: 0}], “mergeOrderStatus”: 2, “productColor”: “NFC版 樱语粉”, “productSize”: “”, “textIntegral”: 20, “imageIntegral”: 20, “ownId”: 1000004259, “ownType”: 0, “extMap”: {}, “location”: “北京”, “status”: 1, “referenceId”: “100056777867”, “referenceTime”: “2023-05-09 10:14:56”, “nickname”: "j**青”, “replyCount2”: 1, “userImage”: “misc.360buyimg.com/user/myjd-2015/css/i/peisong.jpg”, “orderId”: 0, “integral”: 40, “productSales”: “[]”, “referenceImage”: “jfs/t1/151869/33/21978/39582/65d814c0F278d8b8e/9a9fc4e04f5913de.jpg”, “referenceName”: “华为手环 8 NFC版华为手环智能手环快充长续航樱语粉”, “firstCategory”: 652, “secondCategory”: 12345, “thirdCategory”: 12347, “aesPin”: null, “days”: 34, “afterDays”: 0}], “soType”: 5, “csv”: “eid=100^^tagid=ALL^^pid=20004^^sku=100056777867^^sversion=1001^^pageSize=97”, “imageListCount”: 500, “hotCommentTagStatistics”: [{“id”: “be4c76ce01b83386”, “name”: “简单方便”, “count”: 405, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “be4c76ce01b83386”, “ckeKeyWordBury”: “eid=100^^tagid=be4c76ce01b83386^^pid=20004^^sku=100056777867^^sversion=1000^^token=304df814db7dfe1a”}, {“id”: “0c125ea5ae9c4bcf”, “name”: “十分漂亮”, “count”: 242, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “0c125ea5ae9c4bcf”, “ckeKeyWordBury”: “eid=100^^tagid=0c125ea5ae9c4bcf^^pid=20004^^sku=100056777867^^sversion=1000^^token=268d91deb8578310”}, {“id”: “ef2079d29cdd617e”, “name”: “送给TA”, “count”: 194, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “ef2079d29cdd617e”, “ckeKeyWordBury”: “eid=100^^tagid=ef2079d29cdd617e^^pid=20004^^sku=100056777867^^sversion=1000^^token=56a787a088e47608”}, {“id”: “d0fcfbb03e589d31”, “name”: “功能丰富”, “count”: 169, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “d0fcfbb03e589d31”, “ckeKeyWordBury”: “eid=100^^tagid=d0fcfbb03e589d31^^pid=20004^^sku=100056777867^^sversion=1000^^token=c5acc57130ed4a4e”}, {“id”: “2e081e590dadfb1e”, “name”: “颜值够高”, “count”: 168, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “2e081e590dadfb1e”, “ckeKeyWordBury”: “eid=100^^tagid=2e081e590dadfb1e^^pid=20004^^sku=100056777867^^sversion=1000^^token=6501d01dd8c468b4”}, {“id”: “166ce769dfd43400”, “name”: “灵敏度强”, “count”: 161, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “166ce769dfd43400”, “ckeKeyWordBury”: “eid=100^^tagid=166ce769dfd43400^^pid=20004^^sku=100056777867^^sversion=1000^^token=82a1b0e3da31f7fb”}, {“id”: “689ab9147d04a4f8”, “name”: “十分精准”, “count”: 124, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “689ab9147d04a4f8”, “ckeKeyWordBury”: “eid=100^^tagid=689ab9147d04a4f8^^pid=20004^^sku=100056777867^^sversion=1000^^token=b34ebc117c6dd9c9”}, {“id”: “f73ff8a67080d06d”, “name”: “十分舒服”, “count”: 123, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “f73ff8a67080d06d”, “ckeKeyWordBury”: “eid=100^^tagid=f73ff8a67080d06d^^pid=20004^^sku=100056777867^^sversion=1000^^token=003783759fe3b02c”}, {“id”: “7f90c27148d47e2a”, “name”: “十分好看”, “count”: 122, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “7f90c27148d47e2a”, “ckeKeyWordBury”: “eid=100^^tagid=7f90c27148d47e2a^^pid=20004^^sku=100056777867^^sversion=1000^^token=1279eda48e504a94”}, {“id”: “fa238435cb1ec479”, “name”: “十分好用”, “count”: 108, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “fa238435cb1ec479”, “ckeKeyWordBury”: “eid=100^^tagid=fa238435cb1ec479^^pid=20004^^sku=100056777867^^sversion=1000^^token=758287380a680be0”}, {“id”: “2a2422ee9d1f7dfc”, “name”: “反应灵敏”, “count”: 94, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “2a2422ee9d1f7dfc”, “ckeKeyWordBury”: “eid=100^^tagid=2a2422ee9d1f7dfc^^pid=20004^^sku=100056777867^^sversion=1000^^token=41958245512c11cc”}, {“id”: “f8952a488a11ced2”, “name”: “做工精细”, “count”: 85, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “f8952a488a11ced2”, “ckeKeyWordBury”: “eid=100^^tagid=f8952a488a11ced2^^pid=20004^^sku=100056777867^^sversion=1000^^token=727f5eabbe94d16d”}, {“id”: “f7dea694e34bf383”, “name”: “颜色好看”, “count”: 64, “type”: 4, “canBeFiltered”: true, “stand”: 1, “rid”: “f7dea694e34bf383”, “ckeKeyWordBury”: “eid=100^^tagid=f7dea694e34bf383^^pid=20004^^sku=100056777867^^sversion=1000^^token=0bb3ba917d1115c2”}], “testId”: “cmt”, “vTagStatistics”: null, “maxPage”: 100, “productCommentSummary”: {“skuId”: 100056777867, “averageScore”: 5, “defaultGoodCount”: 0, “defaultGoodCountStr”: “5万+”, “commentCount”: 0, “commentCountStr”: “5万+”, “goodCount”: 0, “goodCountStr”: “9300+”, “goodRate”: 0.98, “goodRateShow”: 98, “generalCount”: 0, “generalCountStr”: “80+”, “generalRate”: 0.008, “generalRateShow”: 1, “poorCount”: 0, “poorCountStr”: “90+”, “poorRate”: 0.012, “poorRateShow”: 1, “videoCount”: 0, “videoCountStr”: “200+”, “afterCount”: 0, “afterCountStr”: “100+”, “showCount”: 0, “showCountStr”: “3300+”, “oneYear”: 0, “sensitiveBook”: 0, “fixCount”: 0, “plusCount”: 0, “plusCountStr”: “0”, “buyerShow”: 0, “poorRateStyle”: 2, “generalRateStyle”: 1, “goodRateStyle”: 147, “installRate”: 0, “productId”: 100056777867, “score1Count”: 90, “score2Count”: 25, “score3Count”: 56, “score4Count”: 100, “score5Count”: 5000}, “productAttr”: null}}
我想请问您一下,是否能通过某种方法,先验证是否能够写入starrocks,再发送到下游写入到表呢,只是通过fastjson并不能完全能够避免写入异常,感谢您的耐心解答。
能放到一个文件中么,直接贴这里,格式被破坏了?还有个办法,你把这个放到文件中,直接用stream load导入试试
我昨天追踪了一下异常,是在sink中的invoke方法抛出来的异常,但是我捕获的是flatmap中collect的异常数据,并不能捕获到invoke方法抛出来的异常数据,我看官方的connector中的异常处理也并没有返回异常数据,这很难定位到底是哪条数据导致的异常。而且数据源本身就是starrocks中的表,我不理解为什么能够写入,但是读取出来在写入就报错了,写入时需要指定字符集嘛?
感谢帮忙,已经解决,目前是fastjson的问题,使用gson转的json数据并没有出现字符问题