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

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

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.3.0
    • None
    • Configuration
    • None
    • OS: RHEL 7.2
      Apache NiFi: 1.3.0

    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            kaleem.adil Adil

            Dates

              Created:
              Updated:

              Slack

                Issue deployment