Class ConvertRecord

java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.AbstractRecordProcessor
org.apache.nifi.processors.standard.ConvertRecord
All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent, org.apache.nifi.processor.Processor

@SupportsBatching @InputRequirement(INPUT_REQUIRED) @SideEffectFree @Tags({"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("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.") @UseCase(description="Convert data from one record-oriented format to another", configuration="The Record Reader should be configured according to the incoming data format.\nThe Record Writer should be configured according to the desired output format.") public class ConvertRecord extends AbstractRecordProcessor
  • Field Summary

    Fields inherited from class org.apache.nifi.processors.standard.AbstractRecordProcessor

    INCLUDE_ZERO_RECORD_FLOWFILES, RECORD_READER, RECORD_WRITER, REL_FAILURE, REL_SUCCESS
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    protected Record
    process(Record record, org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessContext context, long count)
     

    Methods inherited from class org.apache.nifi.processors.standard.AbstractRecordProcessor

    getRelationships, migrateProperties, onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractProcessor

    onTrigger

    Methods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor

    getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrue

    Methods inherited from class org.apache.nifi.components.AbstractConfigurableComponent

    customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validate

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.nifi.components.ConfigurableComponent

    getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validate

    Methods inherited from interface org.apache.nifi.processor.Processor

    isStateful, migrateRelationships