- All Implemented Interfaces:
- ConfigurableComponent, Processor
@EventDriven
@SupportsBatching
@InputRequirement(value=INPUT_REQUIRED)
@SideEffectFree
@Tags(value={"convert","record","generic","schema","json","csv","avro","log","logs","freeform","text"})
@WritesAttribute(attribute="mime.type",description="Sets the mime.type attribute to the MIME Type specified by the Record Writer") @WritesAttribute(attribute="record.count",description="The number of records in the FlowFile") @WritesAttribute(attribute="record.error.message",description="This attribute provides on failure the error message encountered by the Reader or Writer.")
@CapabilityDescription(value="Converts records from one data format to another using configured Record Reader and Record Write Controller Services. The Reader and Writer must be configured with \"matching\" schemas. By this, we mean the schemas must have the same field names. The types of the fields do not have to be the same if a field value can be coerced from one type to another. For instance, if the input schema has a field named \"balance\" of type double, the output schema can have a field named \"balance\" with a type of string, double, or float. If any field is present in the input that is not present in the output, the field will be left out of the output. If any field is specified in the output schema but is not present in the input data/schema, then the field will not be present in the output or will have a null value, depending on the writer.")
public class ConvertRecord
extends AbstractRecordProcessor