版本:doris-2.0.8;
复现方式:
建表:
drop table test_json;
create table test_json(a int,b jsonB) duplicate key(a) DISTRIBUTED BY HASH(a) BUCKETS 1;
文件内容:
{
“”:[
{“a”:1,“b”:{“m4”:“-432”,“m14”:583}},
{“a”:2,“b”:{“m4”:“-432”,“m14”:583}},
{“a”:3,“b”:{“m4”:“-432”,“m14”:583}}
]
}
stream load:
curl --location-trusted -u root: -H “jsonpaths: ["$.a", "$.b"]” -H"format:json" -H"strip_outer_array:true" -H"json_root:$." -T
pwd
/test_json.json http://172.16.48.6:28041/api/test_db/test_json/_stream_load
报错:
Reason: [NOT_FOUND]Not found target filed, err: The JSON field referenced does not exist in this object., msg: unable to find field: . src line ;
Reason: [NOT_FOUND]Not found target filed, err: The JSON field referenced does not exist in this object., msg: unable to find field: . src line ;
Reason: [NOT_FOUND]Not found target filed, err: The JSON field referenced does not exist in this object., msg: unable to find field: . src line ;
把jsonpaths参数去掉后,可以正常导入;