CSVRecordLookupService

Description:

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.

Tags:

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

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.

NameDefault ValueAllowable ValuesDescription
CSV 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 Formatdefault
  • 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 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 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 Duplicatestrue
  • true
  • false
Ignore duplicate keys for records in the CSV file.
Value 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)
Quote 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)
Quote ModeMINIMAL
  • 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
Comment 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)
Escape 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.
Supports Expression Language: true (will be evaluated using flow file attributes and variable registry)
Trim Fieldstrue
  • true
  • false
Whether or not white space should be removed from the beginning and end of fields

State management:

This component does not store state.

Restricted:

This component is not restricted.

System Resource Considerations:

None specified.