谢谢老师的回复。

我还是不理解,我在配置http 
request的时候,是明确写出了delete条件,所以在merge的情况下,delete条件是不为null的,这种情况下还是写入失败了,同样的报错。

不知道老师能否提供更详细一些的建议呢?


在 2021-11-19 13:22:18,"寒江雪" <yangz...@gmail.com> 写道:
>ods_name_test 有可能是null, 因此导致 delete 条件整体为null,所以报错,需要保证delete 条件不为null
>
>温天柱 <wtz4...@163.com> 于2021年11月19日周五 上午11:40写道:
>
>> 一、场景描述
>> 使用版本:apache doris 0.14.x
>> 写入模式:stream-load
>> 场景:
>> 在通过http的方式,stream-load向doris写入数据,采用*merge-type*实现*update*的功能。
>> (字段顺序为ods_id_test, ods_name_test, ods_messgae_test, ods_age_test,
>> ods_address_test)
>> update之前的数据为
>> 1,aa,cc,12,ff
>> 预期之后的数据为
>> 1,aa,cc,12,(null)
>>
>> 以下为*http请求内容*(已屏蔽敏感信息):
>> curl --location --request PUT '
>> http://xxx.xxx.xxx.xxx:8040/api/test/ods_testOne/_stream_load' \
>> --header 'Authorization: Basic xxxxxx=' \
>> --header 'Expect: 100-continue' \
>> --header 'Cookie: PALO_SESSION_ID=876x1c2d-xxxx-47b0-872a-xxadsfasdfs' \
>> --header 'column_separator: ,' \
>> --header 'columns:
>> ods_name_test,ods_address_test,ods_age_test,ods_message_test,ods_id_test'
>> \
>> --header 'line_separator: \n' \
>> --header 'merge_type: MERGE' \
>> --header 'delete: ods_name_test='\''aa'\'' AND ods_address_test='\''ff'\''
>> AND ods_age_test='\''12'\'' AND ods_message_test='\''cc'\'' AND
>> ods_id_test='\''1'\''' \
>> --header 'Content-Type: text/plain' \
>> --data-raw 'aa,ff,12,cc,1
>> aa,\N,12,cc,1'
>>
>> 数据库中已存在一条数据
>>
>> 数据库建表语句为:
>> CREATE TABLE `ods_testOne` (
>>   `ods_id_test` int(11) NULL COMMENT "",
>>   `ods_name_test` varchar(255) NULL COMMENT "",
>>   `ods_message_test` varchar(255) NULL COMMENT "",
>>   `ods_age_test` int(11) NULL COMMENT "",
>>   `ods_address_test` varchar(255) NULL COMMENT ""
>> ) ENGINE = OLAP UNIQUE KEY(`ods_id_test`) COMMENT "OLAP" DISTRIBUTED BY
>> HASH(`ods_id_test`) BUCKETS 10 PROPERTIES (
>>   "replication_num" = "1",
>>   "in_memory" = "false",
>>   "storage_format" = "V2"
>> );
>>
>> 问题:发送写入request之后,doris返回了一条error_url,里面内容是:
>> Reason: column(__DORIS_DELETE_SIGN__) value is null while columns is not
>> nullable. src line: [[(aa null 12 cc 1)]];
>>
>> 请问这个问题是因为什么原因造成的呢?有什么解决方法吗?
>>
>>
>>
>>

Reply via email to