Package org.apache.nifi.lookup.db
Class DatabaseRecordLookupService
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.lookup.db.AbstractDatabaseLookupService
org.apache.nifi.lookup.db.DatabaseRecordLookupService
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,LookupService<Record>,RecordLookupService
@Tags({"lookup","cache","enrich","join","rdbms","database","reloadable","key","value","record"})
@CapabilityDescription("A relational-database-based lookup service. When the lookup key is found in the database, the specified columns (or all if Lookup Value Columns are not specified) are returned as a Record. Only one row will be returned for each lookup, duplicate database entries are ignored.")
public class DatabaseRecordLookupService
extends AbstractDatabaseLookupService
implements RecordLookupService
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final org.apache.nifi.components.PropertyDescriptorFields inherited from class org.apache.nifi.lookup.db.AbstractDatabaseLookupService
CACHE_EXPIRATION, CACHE_SIZE, CLEAR_CACHE_ON_ENABLED, DBCP_SERVICE, dbcpService, KEY, LOOKUP_KEY_COLUMN, lookupKeyColumn, properties, REQUIRED_KEYS, TABLE_NAME -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidinit(org.apache.nifi.controller.ControllerServiceInitializationContext context) private static booleanisNotBlank(String value) voidonEnabled(org.apache.nifi.controller.ConfigurationContext context) Methods inherited from class org.apache.nifi.lookup.db.AbstractDatabaseLookupService
getSupportedPropertyDescriptorsMethods inherited from class org.apache.nifi.controller.AbstractControllerService
abstractClearConfigContext, abstractStoreConfigContext, disabled, enabled, getConfigurationContext, getControllerServiceLookup, getIdentifier, getLogger, getNodeTypeProvider, getProperty, getStateManager, initialize, isEnabledMethods inherited from class org.apache.nifi.components.AbstractConfigurableComponent
customValidate, equals, getPropertyDescriptor, getPropertyDescriptors, getSupportedDynamicPropertyDescriptor, hashCode, onPropertyModified, toString, validateMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.nifi.components.ConfigurableComponent
getIdentifier, getPropertyDescriptor, getPropertyDescriptors, onPropertyModified, validateMethods inherited from interface org.apache.nifi.controller.ControllerService
initialize, isStateful, migratePropertiesMethods inherited from interface org.apache.nifi.lookup.RecordLookupService
getValueType
-
Field Details
-
cache
-
LOOKUP_VALUE_COLUMNS
static final org.apache.nifi.components.PropertyDescriptor LOOKUP_VALUE_COLUMNS
-
-
Constructor Details
-
DatabaseRecordLookupService
public DatabaseRecordLookupService()
-
-
Method Details
-
init
protected void init(org.apache.nifi.controller.ControllerServiceInitializationContext context) - Overrides:
initin classorg.apache.nifi.controller.AbstractControllerService
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) -
lookup
- Specified by:
lookupin interfaceLookupService<Record>- Throws:
LookupFailureException
-
lookup
public Optional<Record> lookup(Map<String, Object> coordinates, Map<String, throws LookupFailureExceptionString> context) - Specified by:
lookupin interfaceLookupService<Record>- Throws:
LookupFailureException
-
isNotBlank
-
getRequiredKeys
- Specified by:
getRequiredKeysin interfaceLookupService<Record>
-