Github user mattyb149 commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2039#discussion_r129648705
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateTableFetch.java
---
@@ -198,6 +201,25 @@ public void onTrigger(final ProcessContext context,
final ProcessSessionFactory
// set as the current state map (after the session has been
committed)
final Map<String, String> statePropertyMap = new
HashMap<>(stateMap.toMap());
+ // If an initial max value for column(s) has been specified
using properties, and this column is not in the state manager, sync them to the
state property map
+ final Map<String,String> maxValueProperties =
getDefaultMaxValueProperties(context.getProperties());
--- End diff --
Yeah that's a better idea, should've been done in the original PR but I
missed it during my review and just cut-pasted it back to the abstract class to
share.
I won't be able to move all that common code block as it needs the table
name which can come from a flow file. But I can call
getDefaultMaxValueProperties() at schedule-time vs trigger time.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---