FileAttributesFilter — retrieve record from a file
Retrieves and exposes a record from a delimiter-separated file. Lookup
of the record is performed using a specified key, whose
value is derived from an exchange-scoped expression. The
resulting record is exposed in an object whose location is specified by the
target expression. If a matching record cannot be found,
then the resulting object is empty.
The retrieval of the record is performed lazily; it does not occur
until the first attempt to access a value in the target.
This defers the overhead of file operations and text processing until a value
is first required. This also means that the value expression is not evaluated
until the object is first accessed.
{
"name": string,
"type": "FileAttributesFilter",
"config": {
"file": string,
"charset": string,
"separator": string,
"header": boolean,
"fields": [ string, ... ],
"target": lvalue-expression,
"key": string,
"value": expression
}
}"file": string, requiredThe file containing the record to be read.
"charset": string, optionalThe character set the file is encoded in. Default:
"UTF-8".
"header": boolean, optionalIndicates the first line of the file contains the set of defined
field keys. Default: true.
"fields": array of strings,
optionalExplicit field keys in the order they appear in a record, overriding any existing field header. Default: use field header.
"target": lvalue-expression,
requiredExpression that yields the target object that will contain the record.
"key": string, requiredThe name of the field in the file to perform the lookup on.
"value": expression,
requiredThe name of the handler heap object to dispatch to in the event of caught exceptions.