sburges commented on issue #3825: NIFI-6782: Added repeat() String EL function URL: https://github.com/apache/nifi/pull/3825#issuecomment-543370271 I tested this change locally and it works! The repeat function is really useful. I'm not sure if this was discussed anywhere else or if I am missing something but I am not sure why the API has a second argument to repeat a random number of times. I was able to achieve the same result with an expression like this using just the single argument: ${"str":repeat( ${random():mod(10) } )} //repeat a random number of times between 0 and 10 or ${"str":repeat( ${random():mod(10):plus(10)} )} //repeat a random number of times between 10 adnd 20 This is also JMHO but the function "repeat(int)" makes a lot of sense. If a repeat random number of times, I would think something like repeatRandom(int) would be more clear
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
