[
https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16122783#comment-16122783
]
ASF GitHub Bot commented on NIFI-4257:
--------------------------------------
Github user patricker commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2050#discussion_r132612494
--- Diff:
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/nifi/processors/standard/GenerateTableFetch.java
---
@@ -259,6 +261,11 @@ public void onTrigger(final ProcessContext context,
final ProcessSessionFactory
}
});
+ if(customWhereClause != null) {
+ // adding the custom WHERE clause (if defined) to the list
of existing clauses.
+ maxValueClauses.add(customWhereClause);
--- End diff --
What do you think about forcing custom where clauses to be surrounded with
parenthesis?
I worry that just putting it in like this may cause unexpected consequences
if the where clauses includes OR's.
> Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
> -------------------------------------------------------------
>
> Key: NIFI-4257
> URL: https://issues.apache.org/jira/browse/NIFI-4257
> Project: Apache NiFi
> Issue Type: Improvement
> Components: Extensions
> Reporter: Pierre Villard
> Assignee: Pierre Villard
>
> It could be useful allowing a user to set a custom WHERE clause in
> AbstractDatabaseFetchProcessor in case not all of the data in the table is
> required.
> In case the WHERE clause is changed after the processor has already been
> running, the user will probably have to set the initial maximum values to
> ensure the expected behaviour.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)