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.

Can a NIFI Processor Property be an array

Solved Go to solution

Can a NIFI Processor Property be an array

New Contributor

I've got a set of files to upload. I'd like to define this set as an array of URLS. What is the easiest way to define a set of strings, that will be the input to a processor flow that must process each of the strings individually? Can I create this array as a property, and then loop through that array? Alternatively should I place the set of URLS (strings) into a file that I load and then process the content one string at a time?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Can a NIFI Processor Property be an array

Super Guru
@David Sargrad

Both ways are possible and the easiest way would be using file.

Approach1:

If you want to work with arrays then refer to this link section 2.2 to loop through array and process one string at a time.

Approach2:

You can also keep all url's in a file with new line as row delimiter then use Split Text processor(split one line each) and Extract text processor to extract the content as attribute and use the attribute value to make the call.

Refer to this and this link for more details regards to second approach and serial data processing using NiFi.

2 REPLIES 2

Re: Can a NIFI Processor Property be an array

Super Guru
@David Sargrad

Both ways are possible and the easiest way would be using file.

Approach1:

If you want to work with arrays then refer to this link section 2.2 to loop through array and process one string at a time.

Approach2:

You can also keep all url's in a file with new line as row delimiter then use Split Text processor(split one line each) and Extract text processor to extract the content as attribute and use the attribute value to make the call.

Refer to this and this link for more details regards to second approach and serial data processing using NiFi.

Re: Can a NIFI Processor Property be an array

New Contributor

Thank you very much. I'll try these this week. Great detail in your response.. appreciated.

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