I have following scenario. In first flowfile, I have :
id,name,sms,call
1,sachith,,07121
2,nalaka,039444,
3,john,04954,
4,malcom,,69595
Then I concatinate sms
and call
columns together to a new column called operator
using UpdateRecord
processor. Inspired from this answer
Replacement Value Strategy Record Path Value
/operator concat(/sms, ',', /call)
New flow file is :
id,name,sms,call,operator
1,sachith,,07121,"null,07121"
2,nalaka,039444,,"039444,null"
3,john,04954,,"04954,null"
4,malcom,,69595,"null,,69595"
In next UpdateRecord
processor, I try to remove this null
and make it into a single value. For that I use (need to modify):
Replacement Value Strategy Literal Value
/operator ${field.value:replaceFirst('null',${field.value:substringBefore(',')})}
Output of this is :
id,name,sms,call,operator
1,sachith,,07121,"null,07121"
2,nalaka,039444,,"039444,039444"
3,john,04954,,"04954,04954"
4,malcom,,69595,"null,69595"
What I want to do is simply remove all these null
and replace with the number
id,name,sms,call,operator
1,sachith,,07121,07121
2,nalaka,039444,,039444
3,john,04954,,04954
4,malcom,,69595,69595"
Do I have to use any other processor other than UpdateRecord
?