0 votes
in Big Data | Hadoop by
Merge
  • Merge action is performed on a target table with results of a join with the source table.

  • You have to create two tables, i.e. target and source of a merge.

  • The target table must be bucketed maintaining all the ACID transaction limitations.

hive> merge into employee
    > using (select * from empmerge) sub
    > on sub.id=employee.id
    > when matched then update set name=sub.name,place=sub.place
    > when not matched then insert values(sub.id,sub.name,sub.state);

Related questions

0 votes
asked Apr 3, 2020 in Big Data | Hadoop by Tate
0 votes
asked Apr 3, 2020 in Big Data | Hadoop by Tate
...