SimpleCsvFileLookupService

Description:

A reloadable CSV file-based lookup service. The first line of the csv file is considered as header.

Tags:

lookup, cache, enrich, join, csv, reloadable, key, value

Properties:

In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.

Display NameAPI NameDefault ValueAllowable ValuesDescription
CSV Filecsv-filePath to a CSV File in which the key value pairs can be looked up.

This property requires exactly one file to be provided..

Supports Expression Language: true (will be evaluated using variable registry only)
CSV FormatCSV FormatDefault Format
  • Custom Format The format of the CSV is configured by using the properties of this Controller Service, such as Value Separator
  • RFC 4180 CSV data follows the RFC 4180 Specification defined at https://tools.ietf.org/html/rfc4180
  • Microsoft Excel CSV data follows the format used by Microsoft Excel
  • Tab-Delimited CSV data is Tab-Delimited instead of Comma Delimited
  • MySQL Format CSV data follows the format used by MySQL
  • Informix Unload The format used by Informix when issuing the UNLOAD TO file_name command
  • Informix Unload Escape Disabled The format used by Informix when issuing the UNLOAD TO file_name command with escaping disabled
  • Default Format Same as custom format. Available for compatibility reasons.
  • RFC4180 Same as RFC 4180. Available for compatibility reasons.
Specifies which "format" the CSV data is in, or specifies if custom formatting should be used.
Character SetCharacter SetUTF-8The Character Encoding that is used to decode the CSV file.
Supports Expression Language: true (will be evaluated using variable registry only)
Lookup Key Columnlookup-key-columnThe field in the CSV file that will serve as the lookup key. This is the field that will be matched against the property specified in the lookup processor.
Supports Expression Language: true (will be evaluated using variable registry only)
Ignore Duplicatesignore-duplicatestrue
  • true
  • false
Ignore duplicate keys for records in the CSV file.
Value SeparatorValue Separator,The character that is used to separate values/fields in a CSV Record. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Value Separator at runtime, then it will be skipped and the default Value Separator will be used.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Quote CharacterQuote Character"The character that is used to quote values so that escape characters do not have to be used. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Quote Character at runtime, then it will be skipped and the default Quote Character will be used.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Quote ModeQuote ModeQuote Minimal
  • Quote All Values All values will be quoted using the configured quote character.
  • Quote Minimal Values will be quoted only if they are contain special characters such as newline characters or field separators.
  • Quote Non-Numeric Values Values will be quoted unless the value is a number.
  • Do Not Quote Values Values will not be quoted. Instead, all special characters will be escaped using the configured escape character.
Specifies how fields should be quoted when they are written

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Comment MarkerComment MarkerThe character that is used to denote the start of a comment. Any line that begins with this comment will be ignored.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Escape CharacterEscape Character\The character that is used to escape characters that would otherwise have a specific meaning to the CSV Parser. If the property has been specified via Expression Language but the expression gets evaluated to an invalid Escape Character at runtime, then it will be skipped and the default Escape Character will be used. Setting it to an empty string means no escape character should be used.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Trim FieldsTrim Fieldstrue
  • true
  • false
Whether or not white space should be removed from the beginning and end of fields

This Property is only considered if the [CSV Format] Property has a value of "Custom Format".
Lookup Value Columnlookup-value-columnLookup value column.
Supports Expression Language: true (will be evaluated using variable registry only)

State management:

This component does not store state.

Restricted:

Required PermissionExplanation
read filesystemProvides operator the ability to read from any file that NiFi has access to.

System Resource Considerations:

None specified.