NIFI-5303: Fixed QueryDatabaseTable to work with DB2

Signed-off-by: Pierre Villard <pierre.villard.fr@gmail.com>

This closes #2788.
This commit is contained in:
Matthew Burgess 2018-06-12 12:26:19 -04:00 committed by Pierre Villard
parent 90b8e7f9ff
commit 0886dcb0b4
1 changed files with 10 additions and 0 deletions

View File

@ -367,6 +367,16 @@ public class QueryDatabaseTable extends AbstractDatabaseFetchProcessor {
if (maxFragments > 0 && fragmentIndex >= maxFragments) {
break;
}
// If we aren't splitting up the data into flow files or fragments, then the result set has been entirely fetched so don't loop back around
if (maxFragments == 0 && maxRowsPerFlowFile == 0) {
break;
}
// If we are splitting up the data into flow files, don't loop back around if we've gotten all results
if(maxRowsPerFlowFile > 0 && nrOfRows.get() < maxRowsPerFlowFile) {
break;
}
}
// Even though the maximum value and total count are known at this point, to maintain consistent behavior if Output Batch Size is set, do not store the attributes