QueryNiFiReportingTask

Description:

Publishes NiFi status information based on the results of a user-specified SQL query. The query may make use of the CONNECTION_STATUS, PROCESSOR_STATUS, BULLETINS, PROCESS_GROUP_STATUS, JVM_METRICS, CONNECTION_STATUS_PREDICTIONS, FLOW_CONFIG_HISTORY, or PROVENANCE tables, and can use any functions or capabilities provided by Apache Calcite. Note that the CONNECTION_STATUS_PREDICTIONS table is not available for querying if analytics are not enabled (see the nifi.analytics.predict.enabled property in nifi.properties). Attempting a query on the table when the capability is disabled will cause an error.

Additional Details...

Tags:

status, connection, processor, jvm, metrics, history, bulletin, prediction, process, group, provenance, record, sql, flow, config

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
SQL Querysql-reporting-querySQL SELECT statement specifies which tables to query and how data should be filtered/transformed. SQL SELECT can select from the CONNECTION_STATUS, PROCESSOR_STATUS, BULLETINS, PROCESS_GROUP_STATUS, JVM_METRICS, CONNECTION_STATUS_PREDICTIONS, or PROVENANCE tables. Note that the CONNECTION_STATUS_PREDICTIONS table is not available for querying if analytics are not enabled).
Supports Expression Language: true (will be evaluated using Environment variables only)
Record Destination Servicesql-reporting-record-sinkController Service API:
RecordSinkService
Implementations: RecordSinkServiceLookup
KafkaRecordSink_2_6
ZendeskRecordSink
AzureEventHubRecordSink
EmailRecordSink
ScriptedRecordSink
DatabaseRecordSink
SiteToSiteReportingRecordSink
PrometheusRecordSink
LoggingRecordSink
UDPEventRecordSink
SlackRecordSink
Specifies the Controller Service to use for writing out the query result records to some destination.
Include Zero Record Resultssql-reporting-include-zero-record-resultsfalse
  • true
  • false
When running the SQL statement, if the result has no data, this property specifies whether or not the empty result set will be transmitted.
Default Decimal Precisiondbf-default-precision10When a DECIMAL/NUMBER value is written as a 'decimal' Avro logical type, a specific 'precision' denoting number of available digits is required. Generally, precision is defined by column data type definition or database engines default. However undefined precision (0) can be returned from some database engines. 'Default Decimal Precision' is used when writing those undefined precision numbers.
Supports Expression Language: true (will be evaluated using Environment variables only)
Default Decimal Scaledbf-default-scale0When a DECIMAL/NUMBER value is written as a 'decimal' Avro logical type, a specific 'scale' denoting number of available decimal digits is required. Generally, scale is defined by column data type definition or database engines default. However when undefined precision (0) is returned, scale can also be uncertain with some database engines. 'Default Decimal Scale' is used when writing those undefined numbers. If a value has more decimals than specified scale, then the value will be rounded-up, e.g. 1.53 becomes 2 with scale 0, and 1.5 with scale 1.
Supports Expression Language: true (will be evaluated using Environment variables only)

State management:

ScopeDescription
LOCALStores the Reporting Task's last execution time so that on restart the task knows where it left off.

Restricted:

This component is not restricted.

System Resource Considerations:

None specified.