Hi Aruna, The resulted two FlowFiles have the same contents I guess, that is the PDF file you specified at FetchS3Object Object Key. The flow worked as follows actually: 1. ListS3 listed two FlowFiles, Ntl_15.csv and 11500509.pdf 2. FetchS3Object is executed twice for each incoming FlowFile 2-1. FetchS3Object fetched 11500509.pdf from S3 for the incoming FlowFile whose 'finename' attribute is Ntl_15.csv 2-2. FetchS3Object fetched 11500509.pdf from S3 for the incoming FlowFile whose 'finename' attribute is 11500509.pdf 3. Listing two FlowFiles in the 'success' relationship showed two FlowFiles as if csv and pdf are fetched, but both are the same pdf actually.
I recommend to use RouteOnAttribute between ListS3 and FetchS3Object to filter FlowFiles by 'filename' attribute. Hope this helps, Koji On Thu, Jan 4, 2018 at 5:27 AM, Aruna Sankaralingam < [email protected]> wrote: > I have 2 files in S3 – one is CSV and other is pdf. I want to fetch the > pdf and load into Elastic Search. Even though I give the object key as the > pdf file name, it is still taking all the files from S3. How do I make sure > it takes only the file that is needed? > > > > > > > >
