Member since
10-26-2016
2
Posts
1
Kudos Received
0
Solutions
10-26-2016
07:04 PM
Thank you for your reply. However, I have a follow up question. My assumption is that toRadix function converts from a base 10 to any other base. My requirement is to convert Hexadecimal to base 10. Could you please explain how ${'$2':prepend('0x'):append('p0'):toRadix(10)} would convert OF to 15? Also, I tried the expression but it fails due to the following error : java.lang.classCastException
... View more
10-26-2016
04:08 PM
1 Kudo
I have a flow file coming in, which has fixed width data in the following format :
ABC 0F 15343543543454434 gghhhhhg ABC 01 43353434343414343 hjvh
I want to have my output data in the following format:
ABC|15|15343543543454434|gghhhhhg ABC|1|433534343434341434|hjvh
to get this output I need to convert the second field in each line to base10 integer and apply a strip operation to all the other fields to trim the white spaces. I tried using the replaceText processor but I could not find a way to convert the second field to a base10 integer or apply strip function to the string fields.
... View more
Labels:
- Labels:
-
Apache NiFi