This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch support/nifi-1.x
in repository https://gitbox.apache.org/repos/asf/nifi.git

commit 1971983678fa4725afa8c7720873afd596f9f0f0
Author: lehelb <lehe...@hotmail.com>
AuthorDate: Fri Nov 3 17:17:48 2023 +0100

    NIFI-12314 Fix EL for SQL Query Property in QueryNiFiReportingTask
    
    This closes #7976
    
    Signed-off-by: David Handermann <exceptionfact...@apache.org>
    (cherry picked from commit 514c8d8a6ae7046836eac07091f93f6ccbb2cf22)
---
 .../main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
index 78c7735e14..4ed5c85c38 100644
--- 
a/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
+++ 
b/nifi-nar-bundles/nifi-sql-reporting-bundle/nifi-sql-reporting-tasks/src/main/java/org/apache/nifi/reporting/sql/QueryNiFiReportingTask.java
@@ -90,7 +90,7 @@ public class QueryNiFiReportingTask extends 
AbstractReportingTask implements Que
     @Override
     public void onTrigger(ReportingContext context) {
         final StopWatch stopWatch = new StopWatch(true);
-        String sql = context.getProperty(QueryMetricsUtil.QUERY).getValue();
+        String sql = 
context.getProperty(QueryMetricsUtil.QUERY).evaluateAttributeExpressions().getValue();
         try {
             sql = processStartAndEndTimes(context, sql, BULLETIN_START_TIME, 
BULLETIN_END_TIME);
             sql = processStartAndEndTimes(context, sql, PROVENANCE_START_TIME, 
PROVENANCE_END_TIME);

Reply via email to