- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Can a NIFI Processor Property be an array
- Labels:
-
Apache NiFi
Created on ‎10-12-2018 02:31 PM - edited ‎09-16-2022 06:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Created ‎10-12-2018 08:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎10-12-2018 08:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Created ‎10-15-2018 12:48 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you very much. I'll try these this week. Great detail in your response.. appreciated.
