I have multiple flowfile as an output of spitjson processor , all are same flowfile with same content . I just want to forward one flowfile . Is there a way to do that in nifi
yes it should be possible.
splitjson
processor write fragment.index
attribute to each flowfile
A one-up number that indicates the ordering of the split FlowFiles that were created from a single parent FlowFile
each flowfile will receive a unique fragment.index
starting from 1
to number of flowfile
so you can use route on attribute to only keeper flowfile with fragment.index
equal to 1
Flow :
input data :
[{"name":"Gayle Hays"},{"name":"Merritt Calhoun"},{"name":"Tamara Lane"},{"name":"Contreras Heath"},{"name":"Martinez Watson"}]
RouteOnAttribute
processor configuration: