Support Questions

Find answers, ask questions, and share your expertise

How to Concat string in QueryRecord in Nifi?

avatar
Rising Star

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.

38585-queryrecord.png

2 REPLIES 2

avatar
New Contributor

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

avatar
Master Guru

Try || instead of CONCAT or +, the former is the standard and the latter are not, according to this.