ijokarumawak commented on a change in pull request #3575: NIFI-6271, fix
incoming flowfile attributes don't copy into output flowfiles when Output Batch
Size is set
URL: https://github.com/apache/nifi/pull/3575#discussion_r301348808
##########
File path:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/AbstractExecuteSQL.java
##########
@@ -312,12 +312,6 @@ public void onTrigger(final ProcessContext context, final
ProcessSession session
// If we've reached the batch size, send out
the flow files
if (outputBatchSize > 0 &&
resultSetFlowFiles.size() >= outputBatchSize) {
session.transfer(resultSetFlowFiles,
REL_SUCCESS);
- // Need to remove the original input file
if it exists
- if (fileToProcess != null) {
- session.remove(fileToProcess);
- fileToProcess = null;
- }
- session.commit();
Review comment:
Hi @avseq1234 That's true. I agree with the approach using
`session.create(attributeMap`. Losing the parent linkage is acceptable in this
case I believe, since current master doesn't have it, too, and also it's
impossible to support partial process session commit (which requires removing
the incoming FlowFile) and reporting FORK lineage at later iteration (which
requires the already removed FlowFile) at the same time.
We can optionally add the incoming FlowFile's UUID to an additional FlowFile
attribute of the generated resultSetFFs such as `input.flowfile.uuid` so that
users can search parent FlowFile lineage if needed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services