Skip to content

Commit dab1621

Browse files
committed
pipeline: filters: addressed review comments
Minor changes in language as recommended by vale. Signed-off-by: Oleg Mukhin <[email protected]>
1 parent 604b0b1 commit dab1621

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pipeline/filters/lookup.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Lookup
22

3-
The Lookup plugin looks up a key value from a record in a specified CSV file and, if a match is found, adds the corresponding value from the CSV as a new key-value pair to the record.
3+
The Lookup plugin searches for a record key's value in a CSV file's first column and adds the matching row's second column value as a new key-value pair if found.
44

55
## Configuration parameters
66

@@ -9,7 +9,7 @@ The plugin supports the following configuration parameters:
99
| Key | Description | Default |
1010
| :-- | :---------- | :------ |
1111
| `data_source` | Path to the CSV file that the Lookup filter will use as a lookup table. This file must contain one column of keys and one column of values. See [Key Considerations](#key-considerations) for details. | _none_ (required) |
12-
| `lookup_key` | Specifies the record key whose value to search for in the CSV file's first column. Supports [record accessor](../administration/configuring-fluent-bit/classic-mode/record-accessor) syntax for nested fields and array indexing (e.g., `$user['profile']['id']`, `$users[0]['id']`). | _none_ (required) |
12+
| `lookup_key` | Specifies the record key whose value to search for in the CSV file's first column. Supports [record accessor](../administration/configuring-fluent-bit/classic-mode/record-accessor) syntax for nested fields and array indexing (for example, `$user['profile']['id']`, `$users[0]['id']`). | _none_ (required) |
1313
| `result_key` | If a CSV entry whose value matches the value of `lookup_key` is found, specifies the name of the new key to add to the output record. This new key uses the corresponding value from the second column of the CSV file in the same row where `lookup_key` was found. If this key already exists in the record, it will be overwritten. | _none_ (required) |
1414
| `ignore_case` | Specifies whether to ignore case when searching for `lookup_key`. If `true`, searches are case-insensitive. If `false`, searches are case-sensitive. Case normalization applies to both the lookup key from the record and the keys in the CSV file. | `false` |
1515
| `skip_header_row` | If `true`, the filter skips the first row of the CSV file, treating it as a header. If `false`, the first row is processed as data. | `false` |
@@ -112,7 +112,7 @@ no-match-host,Should Not Appear
112112

113113
When the filter finds a match, it adds a new key with the name specified by `result_key` and a value from the second column of the CSV file of the row where `lookup_key` was found.
114114

115-
For the above configuration the following output can be expected (when matching case is ignored as `ignore_case` is set to true):
115+
For the previous configuration the following output can be expected (when matching case is ignored as `ignore_case` is set to true):
116116

117117
```text
118118
{"hostname"=>"server-prod-001", "business_line"=>"Finance"}
@@ -144,9 +144,9 @@ Each metric includes a `name` label to identify the filter instance.
144144

145145
- The CSV is used to create an in-memory key value lookup table. Column 1 of the CSV is always used as key, while column 2 is assumed to be the value. All other columns in the CSV are ignored.
146146
- CSV fields can be enclosed in double quotes (`"`). Lines with unmatched quotes are logged as warnings and skipped.
147-
- Multiline values in CSV file are not currently supported.
147+
- Multiline values in CSV file aren't currently supported.
148148
- Duplicate keys (values in first column) in the CSV will use the last occurrence (hash table behavior)
149149
- Leading and trailing whitespace is automatically trimmed from both keys and values.
150-
- The `lookup_key` can be of various types: strings are used directly, integers and floats are converted to their string representation, booleans become "true" or "false", and null becomes "null". Records with array or object values for the lookup key are passed through unchanged.
150+
- The `lookup_key` can be of various types: strings are used directly, integers and floats are converted to their string representation, booleans become `true` or `false`, and null becomes `null`. Records with array or object values for the lookup key are passed through unchanged.
151151
- Records without the `lookup_key` field or with no matching CSV entry are passed through unchanged.
152-
- This filter is currently intended for static datasets. CSV is loaded once when Fluent Bit starts and is not reloaded.
152+
- This filter is currently intended for static datasets. CSV is loaded once when Fluent Bit starts and isn't reloaded.

0 commit comments

Comments
 (0)