三角洲湖支持通过join更新吗?

时间:2019-10-30 15:50:10

标签: apache-spark databricks delta delta-lake

是否可以通过join在三角洲的湖面上进行更新?在mysql(和其他数据库)中,您可以像

update table x 
join table y on y.a=x.a 
set x.b=y.b
where x.c='something'

我们在三角洲中有类似的东西吗?我知道他们支持和存在子句。他们的文档似乎没有提及有关更新联接的任何内容

1 个答案:

答案 0 :(得分:1)

您可以使用MERGE INTO命令来实现。像这样:

    merge into x using y
    on (x.a=y.a and x.c='something')
    when matched then
    update set x.b=y.b;
相关问题