Apologies fort he horrible image quality: [cid:[email protected]]
From: Doğukan Levendoğlu | Obase Sent: 03 November 2023 12:06 To: '[email protected]' <[email protected]> Subject: Expression Language does not work within QueryNifiReportingTask Hello, I'm trying to add additional fields to the query results obtained by QueryNifiReportingTask like below: [cid:[email protected]] SQL Query property in QueryNifiReportingTask indicates that it supports the expression language. My understanding is that the query needs to be evaluated before execution. However I am getting this error ( which tells me that's not what's happening): QueryNiFiReportingTask[id=8fbb9a3a-018b-1000-ffff-ffffbb48d6d7] Error processing the query due to java.sql.SQLException: Error while preparing statement [SELECT *, 'myCluster' as clusterName, ${hostname(true)} as 'hostname' FROM PROCESSOR_STATUS]: org.apache.nifi.reporting.sql.MetricsSqlQueryService$PreparedStatementException: java.sql.SQLException: Error while preparing statement [SELECT *, 'myCluster' as clusterName, ${hostname(true)} as 'hostname' FROM PROCESSOR_STATUS] - Caused by: java.sql.SQLException: Error while preparing statement [SELECT *, 'myCluster' as clusterName, ${hostname(true)} as 'hostname' FROM PROCESSOR_STATUS] - Caused by: java.lang.RuntimeException: parse failed: Encountered "$" at line 4, column 2. Was expecting one of: "ABS" ... "ARRAY" ... "AVG" ... "CARDINALITY" ... "CASE" ... "CAST" ... "CEIL" ... "CEILING" ... "CHAR" ... . . . We want to be able to monitor some processors on a per node basis. Is there a cleaner way to do this? I am on version 1.23.2. Thank you, Dogukan
