@SideEffectFree @SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"update","record","generic","schema","json","csv","avro","freeform","text","remove","delete"}) @CapabilityDescription(value="Modifies the contents of a FlowFile that contains Record-oriented data (i.e. data that can be read via a RecordReader and written by a RecordWriter) by removing selected fields. This Processor requires that at least one user-defined Property be added. The name of the property is ignored by the processor, but could be a meaningful identifier for the user. The value of the property should indicate a RecordPath that determines the field to be removed. The processor executes the removal in the order in which these properties are added to the processor. Set the \"Record Writer\" to \"Inherit Record Schema\" in order to use the updated Record Schema modified when removing Fields.") @WritesAttributes(value=@WritesAttribute(attribute="record.error.message",description="This attribute provides on failure the error message encountered by the Reader or Writer.")) @DynamicProperty(name="(Ignored)", value="A RecordPath to the field to be removed.", description="Allows users to specify fields to remove that match the RecordPath.", expressionLanguageScope=FLOWFILE_ATTRIBUTES) @SeeAlso(value=UpdateRecord.class) public class RemoveRecordField extends AbstractRecordProcessor
| Modifier and Type | Field and Description |
|---|---|
private RecordPathCache |
recordPathCache |
private List<RecordFieldRemover.RecordPathRemovalProperties> |
recordPathsToRemove |
private static String |
ROOT_PATH |
INCLUDE_ZERO_RECORD_FLOWFILES, RECORD_READER, RECORD_WRITER, REL_FAILURE, REL_SUCCESS| Constructor and Description |
|---|
RemoveRecordField() |
| Modifier and Type | Method and Description |
|---|---|
void |
collectRecordPaths(ProcessContext context) |
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected Record |
process(Record record,
FlowFile flowFile,
ProcessContext context,
long count) |
getRelationships, getSupportedPropertyDescriptors, onTriggeronTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateprivate volatile RecordPathCache recordPathCache
private volatile List<RecordFieldRemover.RecordPathRemovalProperties> recordPathsToRemove
private static final String ROOT_PATH
protected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentprotected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponent@OnScheduled public void collectRecordPaths(ProcessContext context)
protected Record process(Record record, FlowFile flowFile, ProcessContext context, long count)
process in class AbstractRecordProcessorCopyright © 2023 Apache NiFi Project. All rights reserved.