- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Insert else update into hive table using NIFI
- Labels:
-
Apache NiFi
Created ‎06-25-2017 03:40 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am planning to read from db2 database and do a update else insert into a hive table. what processors should be used to achive this.
Created ‎06-26-2017 03:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For reading from the RDBMS, you can use processors like QueryDatabaseTable or ExecuteSQL. Hive now supports Merge which should cover your update else insert requirement, you can try using a PutHiveQL and seeing if you can issue the merge command using that. Here are some relevant links to the documentation that should help:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge
Created ‎06-26-2017 03:22 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For reading from the RDBMS, you can use processors like QueryDatabaseTable or ExecuteSQL. Hive now supports Merge which should cover your update else insert requirement, you can try using a PutHiveQL and seeing if you can issue the merge command using that. Here are some relevant links to the documentation that should help:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DML#LanguageManualDML-Merge
