exceptionfactory commented on PR #10102: URL: https://github.com/apache/nifi/pull/10102#issuecomment-3114275723
> @exceptionfactory > > > So for clarity, you are proposing to add this new FlowFile attribute to cover the case when Output Batch Size is set? > > Yes, this is the case. > > > ... the real issue is that the Result Set batching does not provide a way to know when the end of the batch is reached. Is that accurate? > > Almost. We don't know in advance how many fragments we will have, and result set batching outputs fragments while we are still fetching data from the DB. We only know the number of total fragments, when we have reached the very end of the result set. Thanks for clarifying, that is very helpful. Taking a step back then, the issue is not really adding the new FlowFile attribute, as it can be easily inferred. As far as the optimal solution, did you consider calling `ResultSet.hasNext()` before calling `ProcessSession.commitAsync()`? That would indicate whether there are more rows to retrieve, or whether the last FlowFile created is actually the last FlowFile of the batch. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
