- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Getting error while executing hive merge
- Labels:
-
Apache Hive
Created ‎02-09-2017 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am running below query:
MERGE INTO college_for_mrg AS T USING college AS S ON clg_name = clg_name WHEN MATCHED AND clg_id > 5 THEN UPDATE SET clg_loc = "ind" WHEN NOT MATCHED THEN INSERT VALUES(2,"sd","dsd","dsfs");
Both the tables support acid properties.
i have also tried table name as database_name.table_name in query but still its giving same error.
error: FAILED: ParseException line 3:0 cannot recognize input near 'MERGE' 'INTO' 'college_for_mrg'
please help.
Created ‎02-09-2017 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
are you running merge command on HDP? It is not supported in any of the current releases. You need Apache Hive 2.2 for merge functionality. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge
Created ‎02-09-2017 10:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
are you running merge command on HDP? It is not supported in any of the current releases. You need Apache Hive 2.2 for merge functionality. https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge
