Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Duplicate
-
1.20.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
Attachments
Issue Links
- duplicates
-
NIFI-11671 JoinEnrichment SQL strategy doesn't allow attributes in join statement
- Resolved