Class AttributesToCSV
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.AttributesToCSV
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SideEffectFree
@SupportsBatching
@Tags({"csv","attributes","flowfile"})
@InputRequirement(INPUT_REQUIRED)
@CapabilityDescription("Generates a CSV representation of the input FlowFile Attributes. The resulting CSV can be written to either a newly generated attribute named \'CSVAttributes\' or written to the FlowFile as content. If the attribute value contains a comma, newline or double quote, then the attribute value will be escaped with double quotes. Any double quote characters in the attribute value are escaped with another double quote.")
@WritesAttribute(attribute="CSVSchema",description="CSV representation of the Schema") @WritesAttribute(attribute="CSVData",description="CSV representation of Attributes")
public class AttributesToCSV
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final Stringstatic final org.apache.nifi.components.PropertyDescriptorprivate booleanstatic final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate Booleanprivate Booleanstatic final org.apache.nifi.components.PropertyDescriptorprivate booleanprivate static final String(package private) static final org.apache.nifi.components.AllowableValue(package private) static final org.apache.nifi.components.AllowableValueprivate static final Stringprivate Patternprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> private static final Stringprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionattributeListStringToSet(String attributeList) buildAttributesMapForFlowFile(org.apache.nifi.flowfile.FlowFile ff, Set<String> attributes, Pattern attPattern) Set<org.apache.nifi.processor.Relationship> protected List<org.apache.nifi.components.PropertyDescriptor> voidonScheduled(org.apache.nifi.processor.ProcessContext context) voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) Methods inherited from class org.apache.nifi.processor.AbstractProcessor
onTriggerMethods inherited from class org.apache.nifi.processor.AbstractSessionFactoryProcessor
getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, init, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.processor.Processor
isStateful, migrateProperties, migrateRelationships
-
Field Details
-
DATA_ATTRIBUTE_NAME
- See Also:
-
SCHEMA_ATTRIBUTE_NAME
- See Also:
-
OUTPUT_SEPARATOR
- See Also:
-
OUTPUT_MIME_TYPE
- See Also:
-
SPLIT_REGEX
- See Also:
-
OUTPUT_OVERWRITE_CONTENT
static final org.apache.nifi.components.AllowableValue OUTPUT_OVERWRITE_CONTENT -
OUTPUT_NEW_ATTRIBUTE
static final org.apache.nifi.components.AllowableValue OUTPUT_NEW_ATTRIBUTE -
ATTRIBUTES_LIST
public static final org.apache.nifi.components.PropertyDescriptor ATTRIBUTES_LIST -
ATTRIBUTES_REGEX
public static final org.apache.nifi.components.PropertyDescriptor ATTRIBUTES_REGEX -
DESTINATION
public static final org.apache.nifi.components.PropertyDescriptor DESTINATION -
INCLUDE_CORE_ATTRIBUTES
public static final org.apache.nifi.components.PropertyDescriptor INCLUDE_CORE_ATTRIBUTES -
NULL_VALUE_FOR_EMPTY_STRING
public static final org.apache.nifi.components.PropertyDescriptor NULL_VALUE_FOR_EMPTY_STRING -
INCLUDE_SCHEMA
public static final org.apache.nifi.components.PropertyDescriptor INCLUDE_SCHEMA -
PROPERTY_DESCRIPTORS
-
REL_SUCCESS
public static final org.apache.nifi.processor.Relationship REL_SUCCESS -
REL_FAILURE
public static final org.apache.nifi.processor.Relationship REL_FAILURE -
RELATIONSHIPS
-
includeCoreAttributes
-
coreAttributes
-
destinationContent
private volatile boolean destinationContent -
nullValForEmptyString
private volatile boolean nullValForEmptyString -
pattern
-
includeSchema
-
-
Constructor Details
-
AttributesToCSV
public AttributesToCSV()
-
-
Method Details
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
buildAttributesMapForFlowFile
-
attributeListStringToSet
-
onScheduled
@OnScheduled public void onScheduled(org.apache.nifi.processor.ProcessContext context) -
onTrigger
public void onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException - Specified by:
onTriggerin classorg.apache.nifi.processor.AbstractProcessor- Throws:
org.apache.nifi.processor.exception.ProcessException
-