I am getting a flowfile with one of the column in content as hexadecimal value. My requirement is to derive a new column with the corresponding decimal value. If i try to use UpdateRecord Processor with replacement value strategy as "Literal value" and try to update the existing field value by using ${field.value:fromRadix(16)} then it is working fine. But if i try to derive a new column using the value of the existing column then am getting run time error. I used Replacement Value strategy as "Record path value" and dynamic property value as ${/existing_column:fromRadix(16)}. Could you please let me know what am missing here.
0
votes
1 Answers
0
votes
If you set the strategy as "Record Path" then the value has to be a valid record path statement after EL evaluation and the statement you have is not valid: ${/existing_column:fromRadix(16)}. It will fail because when it goes to do EL first, EL doesn't know when /existing_column is.
There really needs to be a record path function for fromRadix so that you could do fromRadix( /existing_column, 16).
Without that I think you need to do a two step process...
Step 1 - First UpdateRecord has /new_column = /existing_column to create a new column with hex value of the original column.
Step 2 - Second UpdateRecord has /new_column = ${field.value:fromRadix(16)} to convert the new column.