I have a URL I hit that returns a JSON payload like this:
[ "\/en\/download-data\/546457547?token=ABCDEFGHIJKL123456", "\/en\/download-data\/34543534?token=ABCDEFGHIJKL123456", "\/en\/download-data\/1423422?token=ABCDEFGHIJKL123456", "\/en\/download-data\/97534444?token=ABCDEFGHIJKL123456" ]
Each of the URLs in the response is itself a text file payload.
For each file:
So far I have this processor flow:
Things get complex when trying to use #1 as the basis for the input flowfiles. I'm new to NiFi so any help with which processors to use and how the flow should be setup is much appreciated.
Configure SplitRecord processor's Record Reader/Write controller services and Records per split as 1,Now you are going to have each line will be in new flowfile.
1.GetHTTP 2.SplitRecord 3.ExtractText //extract the content of flowfile and keep as attribute 4.UpdateAttribute //Use nifi expression language to the attribute + advanced usage to make decision. --other processors
Refer to this link for more details regards to the usage of ExtractText and UpdateAttribute processors.