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

Expression Language doesn't evaluate in the JoinEnrichment processor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • 1.20.0
    • 2.0.0
    • None
    • None
    • NiFi setup on Docker

    Description

      Hey Team,

      I am trying to use an Expression Language in the JoinEnrichment processor, to generate the date on the fly when running the SQL

      SQL property on JoinEnrichment

      SELECT original.*, '${now():format("yyyy-MM-dd HH:mm:ss", "Europe/Paris")}' AS Dateval FROM original WHERE record_id NOT IN (SELECT record_id FROM enrichment)

      This gives me an output as follows without actually evaluating the expression language

      [ { "record_id" : "DUMMY--2", "mode_completion" : "2", "Dateval" : "${now():format(\"yyyy-MM-dd HH:mm:ss\", \"Europe/Paris\")}" } ]

      When I run the same on QueryRecord processor

      SELECT *, '${now():format("yyyy-MM-dd HH:mm:ss", "Europe/Paris")}' AS Dateval FROM FLOWFILE

      I get the expression language in the right format as expected

      [ { "record_id" : "DUMMY--1", "mode_completion" : "2", "Dateval" : "2024-12-04 00:29:49" }, { "record_id" : "DUMMY--2", "mode_completion" : "2", "Dateval" : "2024-12-04 00:29:49" } ]

      I also tried to add the expression language to an attribute using UpdateAttribute processor and use the attribute in the JoinEnrichment  still the same issue it just prints the attribute name as it is.

      I am also sharing the sample flow.json for testing.

      Attachments

        1. Dummy_Test.json
          21 kB
          Joby Joje

        Issue Links

          Activity

            People

              pvillard Pierre Villard
              jobyjoje Joby Joje
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: