Package org.apache.nifi.lookup
Class CSVRecordLookupService
java.lang.Object
org.apache.nifi.components.AbstractConfigurableComponent
org.apache.nifi.controller.AbstractControllerService
org.apache.nifi.lookup.AbstractCSVLookupService
org.apache.nifi.lookup.CSVRecordLookupService
- All Implemented Interfaces:
org.apache.nifi.components.ConfigurableComponent,org.apache.nifi.controller.ControllerService,LookupService<Record>,RecordLookupService
@Tags({"lookup","cache","enrich","join","csv","reloadable","key","value","record"})
@CapabilityDescription("A reloadable CSV file-based lookup service. When the lookup key is found in the CSV file, the columns are returned as a Record. All returned fields will be strings. The first line of the csv file is considered as header.")
@Restricted(restrictions=@Restriction(requiredPermission=READ_FILESYSTEM,explanation="Provides operator the ability to read from any file that NiFi has access to."))
public class CSVRecordLookupService
extends AbstractCSVLookupService
implements RecordLookupService
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConcurrentMap<String, Record> (package private) static final org.apache.nifi.components.PropertyDescriptorFields inherited from class org.apache.nifi.lookup.AbstractCSVLookupService
charset, CHARSET, CSV_FILE, csvFile, csvFormat, DEFAULT, IGNORE_DUPLICATES, ignoreDuplicates, KEY, lock, LOOKUP_KEY_COLUMN, lookupKeyColumn, properties, RFC4180, watcher -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.nifi.lookup.AbstractCSVLookupService
getSupportedPropertyDescriptors, initMethods 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.LookupService
lookupMethods inherited from interface org.apache.nifi.lookup.RecordLookupService
getValueType
-
Field Details
-
REQUIRED_KEYS
-
CSV_FORMAT
static final org.apache.nifi.components.PropertyDescriptor CSV_FORMAT -
cache
-
-
Constructor Details
-
CSVRecordLookupService
public CSVRecordLookupService()
-
-
Method Details
-
loadCache
- Specified by:
loadCachein classAbstractCSVLookupService- Throws:
IllegalStateExceptionIOException
-
onEnabled
@OnEnabled public void onEnabled(org.apache.nifi.controller.ConfigurationContext context) throws InitializationException, IOException - Overrides:
onEnabledin classAbstractCSVLookupService- Throws:
InitializationExceptionIOException
-
lookup
- Specified by:
lookupin interfaceLookupService<Record>- Throws:
LookupFailureException
-
getRequiredKeys
- Specified by:
getRequiredKeysin interfaceLookupService<Record>
-
onDisabled
@OnDisabled public void onDisabled() -
isCaching
boolean isCaching()
-