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

    Fields
    Modifier and Type
    Field
    Description
    private Map<org.apache.nifi.components.PropertyDescriptor,org.apache.nifi.components.PropertyValue>
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    static final org.apache.nifi.components.PropertyDescriptor
     
    private static final List<org.apache.nifi.components.PropertyDescriptor>
     
    static final org.apache.nifi.processor.Relationship
     
    static final org.apache.nifi.processor.Relationship
     
    static final org.apache.nifi.processor.Relationship
     
    private static final Set<org.apache.nifi.processor.Relationship>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected Collection<org.apache.nifi.components.ValidationResult>
    customValidate(org.apache.nifi.components.ValidationContext validationContext)
     
    Set<org.apache.nifi.processor.Relationship>
     
    protected org.apache.nifi.components.PropertyDescriptor
     
    protected List<org.apache.nifi.components.PropertyDescriptor>
     
    void
    onScheduled(org.apache.nifi.processor.ProcessContext context)
     
    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)
     
    void
    onTrigger(org.apache.nifi.processor.ProcessContext context, org.apache.nifi.processor.ProcessSession session)
     
    private boolean
    putAttribute(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

    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

    equals, getPropertyDescriptor, getPropertyDescriptors, 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, 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

      private static final List<org.apache.nifi.components.PropertyDescriptor> 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

      private static final Set<org.apache.nifi.processor.Relationship> 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:
      customValidate in class org.apache.nifi.components.AbstractConfigurableComponent
    • getSupportedPropertyDescriptors

      protected List<org.apache.nifi.components.PropertyDescriptor> getSupportedPropertyDescriptors()
      Overrides:
      getSupportedPropertyDescriptors in class org.apache.nifi.components.AbstractConfigurableComponent
    • getSupportedDynamicPropertyDescriptor

      protected org.apache.nifi.components.PropertyDescriptor getSupportedDynamicPropertyDescriptor(String propertyDescriptorName)
      Overrides:
      getSupportedDynamicPropertyDescriptor in class org.apache.nifi.components.AbstractConfigurableComponent
    • getRelationships

      public Set<org.apache.nifi.processor.Relationship> getRelationships()
      Specified by:
      getRelationships in interface org.apache.nifi.processor.Processor
      Overrides:
      getRelationships in class org.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:
      onTrigger in class org.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.ProcessException
      IOException
    • putAttribute

      private boolean putAttribute(String attributeName, Optional<String> attributeValue, Map<String,String> attributes, boolean includeEmptyValues, org.apache.nifi.logging.ComponentLog logger)