@EventDriven @SideEffectFree @SupportsBatching @InputRequirement(value=INPUT_REQUIRED) @Tags(value={"lookup","cache","enrich","join","attributes","Attribute Expression Language"}) @CapabilityDescription(value="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 AbstractProcessor
| Modifier and Type | Field and Description |
|---|---|
private List<PropertyDescriptor> |
descriptors |
private Map<PropertyDescriptor,PropertyValue> |
dynamicProperties |
static PropertyDescriptor |
INCLUDE_EMPTY_VALUES |
static PropertyDescriptor |
LOOKUP_SERVICE |
static Relationship |
REL_FAILURE |
static Relationship |
REL_MATCHED |
static Relationship |
REL_UNMATCHED |
private Set<Relationship> |
relationships |
| Constructor and Description |
|---|
LookupAttribute() |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<ValidationResult> |
customValidate(ValidationContext validationContext) |
Set<Relationship> |
getRelationships() |
protected PropertyDescriptor |
getSupportedDynamicPropertyDescriptor(String propertyDescriptorName) |
protected List<PropertyDescriptor> |
getSupportedPropertyDescriptors() |
protected void |
init(ProcessorInitializationContext context) |
void |
onScheduled(ProcessContext context) |
private void |
onTrigger(ComponentLog logger,
LookupService lookupService,
boolean includeEmptyValues,
FlowFile flowFile,
ProcessSession session) |
void |
onTrigger(ProcessContext context,
ProcessSession session) |
private boolean |
putAttribute(String attributeName,
Optional<String> attributeValue,
Map<String,String> attributes,
boolean includeEmptyValues,
ComponentLog logger) |
onTriggergetControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, initialize, isConfigurationRestored, isScheduled, toString, updateConfiguredRestoredTrue, updateScheduledFalse, updateScheduledTrueequals, getPropertyDescriptor, getPropertyDescriptors, hashCode, onPropertyModified, validateclone, finalize, getClass, notify, notifyAll, wait, wait, waitisStatefulgetPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validatepublic static final PropertyDescriptor LOOKUP_SERVICE
public static final PropertyDescriptor INCLUDE_EMPTY_VALUES
public static final Relationship REL_MATCHED
public static final Relationship REL_UNMATCHED
public static final Relationship REL_FAILURE
private List<PropertyDescriptor> descriptors
private Set<Relationship> relationships
private Map<PropertyDescriptor,PropertyValue> dynamicProperties
protected Collection<ValidationResult> customValidate(ValidationContext validationContext)
customValidate in class AbstractConfigurableComponentprotected List<PropertyDescriptor> getSupportedPropertyDescriptors()
getSupportedPropertyDescriptors in class AbstractConfigurableComponentprotected PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
getSupportedDynamicPropertyDescriptor in class AbstractConfigurableComponentpublic Set<Relationship> getRelationships()
getRelationships in interface ProcessorgetRelationships in class AbstractSessionFactoryProcessorprotected void init(ProcessorInitializationContext context)
init in class AbstractSessionFactoryProcessor@OnScheduled public void onScheduled(ProcessContext context)
public void onTrigger(ProcessContext context, ProcessSession session) throws ProcessException
onTrigger in class AbstractProcessorProcessExceptionprivate void onTrigger(ComponentLog logger, LookupService lookupService, boolean includeEmptyValues, FlowFile flowFile, ProcessSession session) throws ProcessException, IOException
ProcessExceptionIOExceptionCopyright © 2023 Apache NiFi Project. All rights reserved.