CalculateRecordStats
Description
Counts the number of Records in a record set, optionally counting the number of elements per category, where the categories are defined by user-defined properties.
Tags
metrics, record, stats
Properties
In the list below required Properties are shown with an asterisk (*). Other properties are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Record Reader * | record-stats-reader | Controller Service: RecordReaderFactory Implementations: AvroReader CEFReader CSVReader ExcelReader GrokReader JsonPathReader JsonTreeReader ReaderLookup ScriptedReader Syslog5424Reader SyslogReader WindowsEventLogReader XMLReader YamlTreeReader | A record reader to use for reading the records. | |
record-stats-limit * | record-stats-limit | 10 | Limit the number of individual stats that are returned for each record path to the top N results. Supports Expression Language, using FlowFile attributes and Environment variables. |
Dynamic Properties
Name | Value | Description |
---|---|---|
The name of the category. For example, sport | The RecordPath that points to the value of the category. For example /sport | Specifies a category that should be counted. For example, if the property name is 'sport' and the value is '/sport', the processor will count how many records have a value of 'soccer' for the /sport field, how many have a value of 'baseball' for the /sport, and so on. These counts be added as attributes named recordStats.sport.soccer, recordStats.sport.baseball. Supports Expression Language: Yes, evaluated using FlowFile Attributes and Environment variables. |
Relationships
Name | Description |
---|---|
failure | If a FlowFile cannot be processed for any reason, it is routed to this Relationship. |
success | All FlowFiles that are successfully processed, are routed to this Relationship. |
Reads Attributes
This processor does not read attributes.
Writes Attributes
Name | Description |
---|---|
record.count | A count of the records in the record set in the FlowFile. |
recordStats.<User Defined Property Name>.<value>.count | Each value discovered for the user defined property will have its own count attribute. Total number of top N value counts to be added is defined by the limit configuration. |
recordStats.<User Defined Property Name>.count | A count of the records that contain a value for the user defined property. |
State Management
This component does not store state.
Restricted
This component is not restricted.
Input Requirement
This component requires an incoming relationship.
System Resource Considerations
This component does not specify system resource considerations.