[ 
https://issues.apache.org/jira/browse/NIFI-5094?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adil updated NIFI-5094:
-----------------------
    Description: 
If we declare an attribute having space in between the name, the EL operations 
doesn't work the way they should work. 

Example: 

Attribute Name declared(without quotes): 'Custom Extract Query' (value is a SQL 
query like:
{code:java}
select colA,colB,colC from dbName.tableName'{code}
)
 EL Operations tested: 
{code:java}
${${'Custom Extract Query'}:toLower:contains('select')}
 ${${'Custom Extract Query'}:toLower:isEmpty()}{code}
If I remove the spaces from the attribute name, the above EL operations work 
properly. 

Adding more explanation:
I tried multiple possible ways for this to work before mentioning it out as 
bug. 

Not working snippets:
{code:java}
${${'Custom Extract Query'}:toLower:contains('select')}
${${'Custom Extract Query'}:toLower:isEmpty()}
${'Custom Extract Query':toLower:contains('select')}
{${'Custom Extract Query':toLower:isEmpty()}
{code}
 


Working Code:
{code:java}
${${'CustomExtractQuery'}:toLower:contains('select')}
${${'CustomExtractQuery'}:toLower:isEmpty()}
${CustomExtractQuery:toLower:contains('select')}
${CustomExtractQuery:toLower:isEmpty()}
{code}

  was:
If we declare an attribute having space in between the name, the EL operations 
doesn't work the way they should work. 

Example: 

Attribute Name declared(without quotes): 'Custom Extract Query' (value is a SQL 
query like: select colA,colB,colC from dbName.tableName')
EL Operations tested: 
${${'Custom Extract Query'}:toLower:contains('select')}
${${'Custom Extract Query'}:toLower:isEmpty()}

If I remove the spaces from the attribute name, the above EL operations work 
properly. 


> EL Operations doesn't work for attributes having names with spaces
> ------------------------------------------------------------------
>
>                 Key: NIFI-5094
>                 URL: https://issues.apache.org/jira/browse/NIFI-5094
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 1.3.0
>         Environment: OS: RHEL 7.2
> Apache NiFi: 1.3.0
>            Reporter: Adil
>            Priority: Minor
>
> If we declare an attribute having space in between the name, the EL 
> operations doesn't work the way they should work. 
> Example: 
> Attribute Name declared(without quotes): 'Custom Extract Query' (value is a 
> SQL query like:
> {code:java}
> select colA,colB,colC from dbName.tableName'{code}
> )
>  EL Operations tested: 
> {code:java}
> ${${'Custom Extract Query'}:toLower:contains('select')}
>  ${${'Custom Extract Query'}:toLower:isEmpty()}{code}
> If I remove the spaces from the attribute name, the above EL operations work 
> properly. 
> Adding more explanation:
> I tried multiple possible ways for this to work before mentioning it out as 
> bug. 
> Not working snippets:
> {code:java}
> ${${'Custom Extract Query'}:toLower:contains('select')}
> ${${'Custom Extract Query'}:toLower:isEmpty()}
> ${'Custom Extract Query':toLower:contains('select')}
> {${'Custom Extract Query':toLower:isEmpty()}
> {code}
>  
> Working Code:
> {code:java}
> ${${'CustomExtractQuery'}:toLower:contains('select')}
> ${${'CustomExtractQuery'}:toLower:isEmpty()}
> ${CustomExtractQuery:toLower:contains('select')}
> ${CustomExtractQuery:toLower:isEmpty()}
> {code}



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

Reply via email to