Apache Nifi: Replacing values in a column using Update Record Processor
问题 I have a csv, which looks like this: name,code,age Himsara,9877,12 John,9437721,16 Razor,232,45 I have to replace the column code according to some regular expressions. My logic is shown in a Scala code below. if(str.trim.length == 9 && str.startsWith("369")){"PROB"} else if(str.trim.length < 8){"SHORT"} else if(str.trim.startsWith("94")){"LOCAL"} else{"INT"} I used a UpdateRecord Processor to replace the data in the code column. I added a property called /code which contains the value. $