Overview
All data in Apache NiFi is represented by an abstraction called a FlowFile. A FlowFile is comprised of two major pieces: content and attributes. The content portion of the FlowFile represents the data on which to operate. For instance, if a file is picked up from a local file system using the GetFile Processor, the contents of the file will become the contents of the FlowFile.
The attributes portion of the FlowFile represents information about the data itself, or
metadata. Attributes are key-value pairs that represent what is known about the data as
well as information that is useful for routing and processing the data appropriately.
Keeping with the example of a file that is picked up from a local file system, the FlowFile
would have an attribute called filename
that reflected the name of the
file on the file system. Additionally, the FlowFile will have a path
attribute that reflects the directory on the file system that this file lived in. The
FlowFile will also have an attribute named uuid
, which is a unique
identifier for this FlowFile. For complete listing of the core attributes check out the
FlowFile section of the Developer Guide.
However, placing these attributes on a FlowFile do not provide much benefit if the user is unable to make use of them. The NiFi Expression Language provides the ability to reference these attributes, compare them to other values, and manipulate their values.