[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16157433#comment-16157433 ] ASF GitHub Bot commented on NIFI-4257: -- Github user asfgit closed the pull request at: https://github.com/apache/nifi/pull/2050 > 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 > Fix For: 1.4.0 > > > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16157432#comment-16157432 ] ASF subversion and git services commented on NIFI-4257: --- Commit c10ff574c4602fe05f5d1dae5eb0b1bd24026c02 in nifi's branch refs/heads/master from [~pvillard] [ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=c10ff57 ] NIFI-4257 - add custom WHERE clause in database fetch processors Signed-off-by: Matthew BurgessThis closes #2050 > 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 > Fix For: 1.4.0 > > > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16157431#comment-16157431 ] ASF GitHub Bot commented on NIFI-4257: -- Github user mattyb149 commented on the issue: https://github.com/apache/nifi/pull/2050 +1 LGTM, ran build and unit tests (and contrib-check), also tested both GenerateTableFetch and QueryDatabaseTable with MySQL and Oracle DBs and various WHERE clauses. Great work! Merging to master > 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 > Fix For: 1.4.0 > > > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16157275#comment-16157275 ] ASF GitHub Bot commented on NIFI-4257: -- Github user pvillard31 commented on the issue: https://github.com/apache/nifi/pull/2050 Done, thanks @mattyb149 ! > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16157084#comment-16157084 ] ASF GitHub Bot commented on NIFI-4257: -- Github user mattyb149 commented on the issue: https://github.com/apache/nifi/pull/2050 Do you mind rebasing this against the latest master? the code LGTM so will run it once it builds cleanly, and merge if all is well, thanks in advance! > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16122989#comment-16122989 ] ASF GitHub Bot commented on NIFI-4257: -- Github user pvillard31 commented on a diff in the pull request: https://github.com/apache/nifi/pull/2050#discussion_r132631612 --- 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 -- Yes @patricker, that makes sense, will push a commit for that. Thanks! > 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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)
[jira] [Commented] (NIFI-4257) Allow a custom WHERE clause in AbstractDatabaseFetchProcessor
[ https://issues.apache.org/jira/browse/NIFI-4257?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16111745#comment-16111745 ] ASF GitHub Bot commented on NIFI-4257: -- GitHub user pvillard31 opened a pull request: https://github.com/apache/nifi/pull/2050 NIFI-4257 - add custom WHERE clause in database fetch processors Thank you for submitting a contribution to Apache NiFi. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### For all changes: - [ ] Is there a JIRA ticket associated with this PR? Is it referenced in the commit message? - [ ] Does your PR title start with NIFI- where is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. - [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? - [ ] Is your initial contribution a single, squashed commit? ### For code changes: - [ ] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder? - [ ] Have you written or updated unit tests to verify your changes? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly? - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly? - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties? ### For documentation related changes: - [ ] Have you ensured that format looks appropriate for the output in which it is rendered? ### Note: Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. You can merge this pull request into a Git repository by running: $ git pull https://github.com/pvillard31/nifi NIFI-4257 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/nifi/pull/2050.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2050 commit 1f0fa6e97c6e357f0e3c796c084dca1fd5de942f Author: Pierre VillardDate: 2017-08-02T13:22:31Z NIFI-4257 - add custom WHERE clause in database fetch processors > 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)