Uploaded image for project: 'Apache NiFi'
  1. Apache NiFi
  2. NIFI-5094

EL Operations doesn't work for attributes having names with spaces

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: Configuration
    • Labels:
      None
    • Environment:
      OS: RHEL 7.2
      Apache NiFi: 1.3.0

    • Flags:
      Patch

      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:

      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. 

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

      Not working snippets:

      ${${'Custom Extract Query'}:toLower:contains('select')}
      ${${'Custom Extract Query'}:toLower:isEmpty()}
      ${'Custom Extract Query':toLower:contains('select')}
      {${'Custom Extract Query':toLower:isEmpty()}
      

       

      Working Code:

      ${${'CustomExtractQuery'}:toLower:contains('select')}
      ${${'CustomExtractQuery'}:toLower:isEmpty()}
      ${CustomExtractQuery:toLower:contains('select')}
      ${CustomExtractQuery:toLower:isEmpty()}
      

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              kaleem.adil Adil
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: