Question 1:
Question:
{"status":"FAILED","msg":"There is no 100-continue header"}
reason:
This prompt appears because the CSV file is empty. In fact, it will not be affected.
Solution:
Add a request header to the command
-H "expect:100-continue"
curl –location-trusted -u root: -H “column_separator:|” -H “columns:__op=‘upsert’” -H “expect:100-continue” -T /home/zw/insert_sr_file/ip_basic.csv http://127.0.0.1:8030/api/zw/ip_basic/_stream_load
Question 2:
Question
There is data in the CSV file, but the error is still reported
CSV data
reason:
This error occurs because the corresponding data in the file does not correspond to the table field
Solution:
Receipt can be performed according to the fields specified in columns
usage:
-H "columns:pid,ip_val,area_id......"
Syntax use case:
curl --location-trusted -u root: \
-H "column_separator:|" \
-H "columns:pid,ip_val,area_id,udate,ftime,utime,ip,bip,cip,oui,mac,cname,user,depart,comp,place,os,os_sub,os_version,host_name,detail,m_type,m_sub_type,bip_val,cip_val,is_asset,is_controlled,source,domain,network_type,insert_unixtime,country_code,__op='upsert'" \
-T /home/zw/insert_sr_file/ip_basic.csv \
http://172.16.130.184:8030/api/zw/ip_basic/_stream_load
Question 3
problem
all partitions have no load data
reason
Caused by an empty file
solve
Don’t take it seriously. It won’t prompt if it’s not an empty file. Not affect