- All Implemented Interfaces:
- ConfigurableComponent, Processor
@EventDriven
@SupportsBatching
@InputRequirement(value=INPUT_REQUIRED)
@CapabilityDescription(value="Receives Record-oriented data (i.e., data that can be read by the configured Record Reader) and evaluates one or more RecordPaths against the each record in the incoming FlowFile. Each record is then grouped with other \"like records\" and a FlowFile is created for each group of \"like records.\" What it means for two records to be \"like records\" is determined by user-defined properties. The user is required to enter at least one user-defined property whose value is a RecordPath. Two records are considered alike if they have the same value for all configured RecordPaths. Because we know that all records in a given output FlowFile have the same value for the fields that are specified by the RecordPath, an attribute is added for each field. See Additional Details on the Usage page for more information and examples.")
@DynamicProperty(name="The name given to the dynamic property is the name of the attribute that will be used to denote the value of the associted RecordPath.",
value="A RecordPath that points to a field in the Record.",
description="Each dynamic property represents a RecordPath that will be evaluated against each record in an incoming FlowFile. When the value of the RecordPath is determined for a Record, an attribute is added to the outgoing FlowFile. The name of the attribute is the same as the name of this property. The value of the attribute is the same as the value of the field in the Record that the RecordPath points to. Note that no attribute will be added if the value returned for the RecordPath is null or is not a scalar value (i.e., the value is an Array, Map, or Record).",
expressionLanguageScope=FLOWFILE_ATTRIBUTES)
@WritesAttribute(attribute="record.count",description="The number of records in an outgoing FlowFile") @WritesAttribute(attribute="mime.type",description="The MIME Type that the configured Record Writer indicates is appropriate") @WritesAttribute(attribute="fragment.identifier",description="All partitioned FlowFiles produced from the same parent FlowFile will have the same randomly generated UUID added for this attribute") @WritesAttribute(attribute="fragment.index",description="A one-up number that indicates the ordering of the partitioned FlowFiles that were created from a single parent FlowFile") @WritesAttribute(attribute="fragment.count",description="The number of partitioned FlowFiles generated from the parent FlowFile") @WritesAttribute(attribute="segment.original.filename ",description="The filename of the parent FlowFile") @WritesAttribute(attribute="<dynamic property name>",description="For each dynamic property that is added, an attribute may be added to the FlowFile. See the description for Dynamic Properties for more information.")
@Tags(value={"record","partition","recordpath","rpath","segment","split","group","bin","organize"})
@SeeAlso(value={ConvertRecord.class,SplitRecord.class,UpdateRecord.class,QueryRecord.class})
public class PartitionRecord
extends AbstractProcessor