
使用Stream Load方式导入本地文件到DorisDB中报错,提示Label Already Exists,Label has already been used。对此报错进行解决处理。

1
现象
使用curl方式从本地将文件导入DorisDB表中时,报错:Label Already Exists,详见如下:
[root@doris1 ~]# curl --location-trusted -u test:dorisdb -H "label:table1_201707071" -H "column_separator:," -T table1_data http://127.0.1.1:8030/api/example_db/table1/_stream_load{"TxnId": -1,"Label": "table1_201707071","Status": "Label Already Exists","ExistingJobStatus": "FINISHED","Message": "Label [table1_201707071] has already been used.","NumberTotalRows": 0,"NumberLoadedRows": 0,"NumberFilteredRows": 0,"NumberUnselectedRows": 0,"LoadBytes": 0,"LoadTimeMs": 0,"BeginTxnTimeMs": 0,"StreamLoadPutTimeMs": 0,"ReadDataTimeMs": 0,"WriteDataTimeMs": 0,"CommitAndPublishTimeMs": 0}[root@doris1 ~]#
2
原因
之前已经导入过一次,本次使用上次标签导致标签冲突。
3
解决方法
以下两种方法均可:
1) lable不能显示删除,导入时可以不指定label,这样会自动生成
curl --location-trusted -u test:dorisdb H "column_separator:," -T table1_data http://192.168.80.32:8030/api/example_db/table1/_stream_load
2) 导入时指定其它标签名称
curl --location-trusted -u test:dorisdb -H "label:table1_201707071" -H "column_separator:," -T table1_data http://127.0.1.1:8030/api/example_db/table1/_stream_load
4
小结
使用Stream Load方式导入本地文件提示Label Already Exists,Label has already been used。DorisDB目前没有提供删除标签的方法,见鬼采用不指定lable方式,或使用其它标签名称的方式进行导入。
—END—

往期推荐
文章转载自rundba,如果涉嫌侵权,请发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。




