Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

how to replace values using a loop in Nifi

Highlighted

how to replace values using a loop in Nifi

New Contributor

I have an attribute which contains a list and I want to replace values with an incrementing value.

Examlple:

Input-

Variable1 = a,b,c

Output-

Variable1=$1a,$2b,$3c

I'm able to count the number of value in the attribute using :

${allDelineatedValues(${col_name}, ","):count()}

After getting the count I want to place as many $1,$2,$3......so on till it reaches the count. How can I do it?

Thanks

2 REPLIES 2

Re: how to replace values using a loop in Nifi

New Contributor

Re: how to replace values using a loop in Nifi

New Contributor

For this I have used a python script to do the job but I wonder if it can be done with nifi expression langauge.

Don't have an account?
Coming from Hortonworks? Activate your account here