June 2018
Beginner to intermediate
210 pages
5h 12m
English
The MERGE statement, available since Hive 2.2, is used to perform UPDATE, DELETE, or INSERT on a target table, based on the JOIN condition matching or not against a source table or query. The standard syntax is as follows:
MERGE INTO <target_table> as Target USING <source_query/table> as SourceON <join_condition between two tables>WHEN MATCHED [AND <boolean expression>] THEN UPDATE SET <set clause list>WHEN MATCHED [AND <boolean expression>] THEN DELETEWHEN NOT MATCHED [AND <boolean expression>] THEN INSERT VALUES <value list>
The current limitations for the MERGE INTO statement are as follows:
Read now
Unlock full access