Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Can a NIFI Processor Property be an array

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

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.

View solution in original post

2 REPLIES 2

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.

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

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.