- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
How to Concat string in QueryRecord in Nifi?
- Labels:
-
Apache NiFi
Created on ‎09-11-2017 07:02 AM - edited ‎08-18-2019 01:21 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Im trying the basic concat using QueryRecord Processor in NIFI. sample firstname +' '+ lastname, but im having an error.
Please see the attached image.
How can i concat in this processor?
Thank you.
Created ‎09-12-2017 03:30 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Regie,
Looking at the error, it's alerting you that you cannot apply the + operator to string/char types. I would assume you need to use the concat function. Please follow the following documentation: http://hadooptutorial.info/string-functions-in-hive/#CONCAT
So, something like: select CONCAT(firstname, ' ', lastname) from <tablename>;
Amanda
Created ‎09-16-2017 01:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try || instead of CONCAT or +, the former is the standard and the latter are not, according to this.
