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);