Anil, Are you using SplitRecord because something times out in PutDatabaseRecord otherwise? If not, you shouldn't need the SplitRecord, and without it, things should work the way you expect.
If you do need to split into smaller flow files, you should be able to use Wait/Notify with the parent flow file UUID as the identifier and the signal count equal to the number of rows divided by the number of Records Per Split in the SplitRecord processor. If you won't know the value of signal count (10 in your example), you might be able to use MergeRecord (with a Defragment strategy) after PutDatabaseRecord to put them back together, then you route that to ExecuteSQL. That involves unnecessary merging of 1 GB of content only to get a single flow file as a trigger, so that would be the least attractive of the options. Regards, Matt On Wed, Jun 6, 2018 at 3:54 PM, Anil Rai <[email protected]> wrote: > Hi All, > > > Usecase - Fetch very very large csv file (1 GB). Insert into a DB and then > execute a stored procedure > > Implementation -> ListSFTP -> FetchSFTP -> SplitRecord (splitting into > smaller files)-> PutDatabaseRecord -> ExecuteSQL > > Problem -> SplitRecord does not tell me how many files it is generating. > Assuming it generates 10 files, ExecuteSQL executes 10 times since > PutDatabaseRecords executes 10 time > > We would like to execute ExecuteSQL only once at the end of the flow ones > all of PutDatabaseRecord operations are complete. > > How do we implement this? > > Thanks > Anil
