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

ASF GitHub Bot commented on NIFI-5017:
--------------------------------------

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

    https://github.com/apache/nifi/pull/2597#discussion_r178135297
  
    --- Diff: 
nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/test/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessorTest.java
 ---
    @@ -187,6 +213,34 @@ public void testSkipColumns() throws Exception {
                     "9.8765E+08,\n");
         }
     
    +    @Test
    +    public void testSkipColumnsWithEL() throws Exception {
    +        testRunner.enqueue(new 
File("src/test/resources/dataformatting.xlsx").toPath());
    --- End diff --
    
    I'm fine with the tests you added. I just suggest that instead of directly 
setting the EL expression in the property value, you do a check against 
attributes that would come with the incoming flow file. Something like:
    
    ````java
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("columnsToSkip", "2");
    testRunner.enqueue(new 
File("src/test/resources/dataformatting.xlsx").toPath(), variables);
    testRunner.setProperty(ConvertExcelToCSVProcessor.COLUMNS_TO_SKIP, 
"${columnsToSkip}");
    ````
    This way we check that EL is correctly evaluated against the attributes of 
the incoming flow files.


> ConvertExcelToCSVProcessor  should Support Expression Language for Number of 
> Rows to Skip and Columns To Skip
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: NIFI-5017
>                 URL: https://issues.apache.org/jira/browse/NIFI-5017
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Extensions
>    Affects Versions: 1.5.0
>            Reporter: Arun A K
>            Priority: Minor
>
> The ConvertExcelToCSVProcessor should support expression language for fields 
> "Number of Rows to Skip" and "Columns To Skip". These two could be a 
> precomputed attribute or looked up value and need to be configurable via EL. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to