[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-27 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943288#comment-15943288
 ] 

ASF subversion and git services commented on NIFI-3596:
---

Commit ced6708d4bca6d179e5f9fbc0b2324102879d21e in nifi's branch 
refs/heads/master from [~pvillard]
[ https://git-wip-us.apache.org/repos/asf?p=nifi.git;h=ced6708 ]

NIFI-3596 - added attributes to GenerateTableFetch processor

Signed-off-by: Matt Burgess 

Updated test to check selected column names

Signed-off-by: Matt Burgess 

This closes #1596


> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
> Fix For: 1.2.0
>
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943287#comment-15943287
 ] 

ASF GitHub Bot commented on NIFI-3596:
--

Github user mattyb149 commented on the issue:

https://github.com/apache/nifi/pull/1596
  
+1 LGTM, built and ran unit tests, also ran with a real NiFi, verified all 
the attributes were added and correct. Thanks for the contribution! Merging to 
master


> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
> Fix For: 1.2.0
>
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-27 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943291#comment-15943291
 ] 

ASF GitHub Bot commented on NIFI-3596:
--

Github user asfgit closed the pull request at:

https://github.com/apache/nifi/pull/1596


> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
> Fix For: 1.2.0
>
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941144#comment-15941144
 ] 

ASF GitHub Bot commented on NIFI-3596:
--

Github user pvillard31 commented on the issue:

https://github.com/apache/nifi/pull/1596
  
Thanks for the review @mattyb149.
I updated a test to check the selected column names.


> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
> Fix For: 1.2.0
>
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-24 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941011#comment-15941011
 ] 

ASF GitHub Bot commented on NIFI-3596:
--

Github user mattyb149 commented on a diff in the pull request:

https://github.com/apache/nifi/pull/1596#discussion_r107984019
  
--- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/test/java/org/apache/nifi/processors/standard/TestGenerateTableFetch.java
 ---
@@ -207,6 +207,12 @@ public void testAddedRows() throws 
ClassNotFoundException, SQLException, Initial
 assertEquals("SELECT * FROM TEST_QUERY_DB_TABLE ORDER BY name 
OFFSET 4 ROWS FETCH NEXT 2 ROWS ONLY", new String(flowFile.toByteArray()));
 flowFile = runner.getFlowFilesForRelationship(REL_SUCCESS).get(3);
 assertEquals("SELECT * FROM TEST_QUERY_DB_TABLE ORDER BY name 
OFFSET 6 ROWS FETCH NEXT 2 ROWS ONLY", new String(flowFile.toByteArray()));
+assertEquals("TEST_QUERY_DB_TABLE", 
flowFile.getAttribute("generatetablefetch.tableName"));
+assertEquals(null, 
flowFile.getAttribute("generatetablefetch.columnNames"));
--- End diff --

All added asserts for columns are checking for null, can you update a test 
(or add one) that sets the Columns To Return property? Otherwise, looks good to 
me, will build and run on a real NiFi in the meantime


> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
> Fix For: 1.2.0
>
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


[jira] [Commented] (NIFI-3596) GenerateTableFetch - Add attributes to generated flow files to ease SQL query overwrite

2017-03-14 Thread ASF GitHub Bot (JIRA)

[ 
https://issues.apache.org/jira/browse/NIFI-3596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15925155#comment-15925155
 ] 

ASF GitHub Bot commented on NIFI-3596:
--

GitHub user pvillard31 opened a pull request:

https://github.com/apache/nifi/pull/1596

NIFI-3596 - added attributes to GenerateTableFetch processor

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:
- [X] Is there a JIRA ticket associated with this PR? Is it referenced 
 in the commit message?

- [X] Does your PR title start with NIFI- where  is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.

- [X] Has your PR been rebased against the latest commit within the target 
branch (typically master)?

- [X] Is your initial contribution a single, squashed commit?

### For code changes:
- [X] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
- [X] Have you written or updated unit tests to verify your changes?

### For documentation related changes:
- [X] 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-3596

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/nifi/pull/1596.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 #1596


commit 6367110cf620ac765ba5f556e6f11fbe0545e639
Author: Pierre Villard 
Date:   2017-03-14T22:19:05Z

NIFI-3596 - added attributes to GenerateTableFetch processor




> GenerateTableFetch - Add attributes to generated flow files to ease SQL query 
> overwrite
> ---
>
> Key: NIFI-3596
> URL: https://issues.apache.org/jira/browse/NIFI-3596
> Project: Apache NiFi
>  Issue Type: Improvement
>  Components: Extensions
>Reporter: Pierre Villard
>Assignee: Pierre Villard
>Priority: Trivial
>
> The GenerateTableFetch processor will generate a SQL query based on the 
> provided parameters but, if the specific DB adapter is not available, it 
> might be necessary to overwrite the SQL query in the ExecuteSQL processor. To 
> do that it would be nice to have each part of the query as attributes to take 
> advantage of expression language.
> Current workaround (when using GenerateTableFetch against a DB2 database for 
> example) is to have an intermediary ExtractText processor and have a regex 
> extracting each part of the generated query.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)