doris导入Excel的xlsx格式数据
1.把xlsx格式另存为csv格式
2.上传到Linux
3.查看字符集
file -i yourfile.csv
结果:
a.csv: text/plain; charset=iso-8859-1
4.转换为utf-8
iconv -f iso-8859-1 -t utf-8 a.csv > b.csv
5.执行命令
curl --location-trusted -u root:888 -T /root/doris/b.csv -H "column_separator:," -H "label:alex-129" http://10.66.66.66:8523/api/you_database/you_table/_stream_load
结果
{
"TxnId": 58,
"Label": "alex-129",
"TwoPhaseCommit": "false",
"Status": "Success",
"Message": "OK",
"NumberTotalRows": 957727,
"NumberLoadedRows": 957727,
"NumberFilteredRows": 0,
"NumberUnselectedRows": 0,
"LoadBytes": 144980651,
"LoadTimeMs": 15666,
"BeginTxnTimeMs": 0,
"StreamLoadPutTimeMs": 2,
"ReadDataTimeMs": 352,
"WriteDataTimeMs": 15620,
"CommitAndPublishTimeMs": 42
}