Class LookupAttribute
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.processor.AbstractSessionFactoryProcessor
org.apache.nifi.processor.AbstractProcessor
org.apache.nifi.processors.standard.LookupAttribute
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.processor.Processor
@SideEffectFree
@SupportsBatching
@InputRequirement(INPUT_REQUIRED)
@Tags({"lookup","cache","enrich","join","attributes","Attribute Expression Language"})
@CapabilityDescription("Lookup attributes from a lookup service")
@DynamicProperty(name="The name of the attribute to add to the FlowFile",
value="The name of the key or property to retrieve from the lookup service",
expressionLanguageScope=FLOWFILE_ATTRIBUTES,
description="Adds a FlowFile attribute specified by the dynamic property\'s key with the value found in the lookup service using the the dynamic property\'s value")
public class LookupAttribute
extends org.apache.nifi.processor.AbstractProcessor
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<org.apache.nifi.components.PropertyDescriptor, org.apache.nifi.components.PropertyValue> static final org.apache.nifi.components.PropertyDescriptorstatic final org.apache.nifi.components.PropertyDescriptorprivate static final List<org.apache.nifi.components.PropertyDescriptor> static final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipstatic final org.apache.nifi.processor.Relationshipprivate static final Set<org.apache.nifi.processor.Relationship> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) Set<org.apache.nifi.processor.Relationship> protected org.apache.nifi.components.PropertyDescriptorgetSupportedDynamicPropertyDescriptor(String propertyDescriptorName) protected List<org.apache.nifi.components.PropertyDescriptor> voidonScheduled(org.apache.nifi.processor.ProcessContext context) private voidonTrigger(org.apache.nifi.logging.ComponentLog logger, LookupService lookupService, boolean includeEmptyValues, org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessSession session) voidonTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session) private booleanputAttribute(String attributeName, Optional<String> attributeValue, Map<String, String> attributes, boolean includeEmptyValues, org.apache.nifi.logging.ComponentLog logger) 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
equals, getPropertyDescriptor, getPropertyDescriptors, 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
-
LOOKUP_SERVICE
public static final org.apache.nifi.components.PropertyDescriptor LOOKUP_SERVICE -
INCLUDE_EMPTY_VALUES
public static final org.apache.nifi.components.PropertyDescriptor INCLUDE_EMPTY_VALUES -
PROPERTY_DESCRIPTORS
-
REL_MATCHED
public static final org.apache.nifi.processor.Relationship REL_MATCHED -
REL_UNMATCHED
public static final org.apache.nifi.processor.Relationship REL_UNMATCHED -
REL_FAILURE
public static final org.apache.nifi.processor.Relationship REL_FAILURE -
RELATIONSHIPS
-
dynamicProperties
private Map<org.apache.nifi.components.PropertyDescriptor,org.apache.nifi.components.PropertyValue> dynamicProperties
-
-
Constructor Details
-
LookupAttribute
public LookupAttribute()
-
-
Method Details
-
customValidate
protected Collection<org.apache.nifi.components.ValidationResult> customValidate(org.apache.nifi.components.ValidationContext validationContext) - Overrides:
customValidatein classorg.apache.nifi.components.AbstractConfigurableComponent
-
getSupportedPropertyDescriptors
- Overrides:
getSupportedPropertyDescriptorsin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getSupportedDynamicPropertyDescriptor
protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) - Overrides:
getSupportedDynamicPropertyDescriptorin classorg.apache.nifi.components.AbstractConfigurableComponent
-
getRelationships
- Specified by:
getRelationshipsin interfaceorg.apache.nifi.processor.Processor- Overrides:
getRelationshipsin classorg.apache.nifi.processor.AbstractSessionFactoryProcessor
-
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
-
onTrigger
private void onTrigger(org.apache.nifi.logging.ComponentLog logger, LookupService lookupService, boolean includeEmptyValues, org.apache.nifi.flowfile.FlowFile flowFile, org.apache.nifi.processor.ProcessSession session) throws org.apache.nifi.processor.exception.ProcessException, IOException - Throws:
org.apache.nifi.processor.exception.ProcessExceptionIOException
-
putAttribute
-