0
votes

Is it possible to do update on a delta lake table with join? In mysql (and other databases) you could something like

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

Do we have something similar in delta? I know they support in and exists clause. Their documentation does not seem to mention anything about update join

1

1 Answers

1
votes

You can achieve it with MERGE INTO command. Something like:

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