Replies: 1 comment 1 reply
-
Partial update on merge-on-write unique table using insert statement is supported since version 2.0.2. If you are using doris with lower version, you can use stream load with |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
官方文档上说明:
对于开启了merge-on-write的Unique表,还可以使用insert语句进行部分列更新的操作。要使用insert语句进行部分列更新,需要将会话变量enable_uniuqe_key_partial_update的值设置为true(该变量默认值为false,即默认无法通过insert语句进行部分列更新)。进行部分列更新时,插入的列必须至少包含所有的Key列,同时指定需要更新的列。如果插入行Key列的值在原表中存在,则将更新具有相同key列值那一行的数据。如果插入行Key列的值在原表中不存在,则将向表中插入一条新的数据,此时insert语句中没有指定的列必须有默认值或可以为null,这些缺失列会首先尝试用默认值填充,如果该列没有默认值,则尝试使用null值填充,如果该列不能为null,则本次插入失败。
对应enable_uniuqe_key_partial_update的设置我这边一直没有找到哪里设置,
我在建表语句里面报错,通过set 命令也失败了。
请问一下那个可以设置这个属性?
Beta Was this translation helpful? Give feedback.
All reactions