Skip to content

Commit 7388238

Browse files
committed
Add documentation for filemap options #265
1 parent 4a2b9ff commit 7388238

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ nothing()
177177

178178
##### `put_filemap`
179179

180-
Defines an external map for lookup from a file.
180+
Defines an external map for lookup from a file. Multi-column mapss are supported.
181181

182182
```perl
183183
put_filemap("<sourceFile>", "<mapName>", sep_char: "\t")
@@ -190,6 +190,16 @@ The separator (`sep_char`) will vary depending on the source file, e.g.:
190190
| CSV | `,` or `;` |
191191
| TSV | `\t` |
192192

193+
Additional options:
194+
195+
- `key_column` defines the column to be used for keys. Uses zero index. Default value: `0`.
196+
- `value_column` defines the column to be used for values. Uses zero index. Default value: `1`.
197+
- `expected_columns` sets number of expected columns; lines with different number of columns are ignored. Set to `-1` to disable the check and allow arbitrary number of columns. Default value: `2`.
198+
- `allow_empty_values` sets whether to allow empty values in the filemap or to ignore these entries. Default value: `false`.
199+
- `compression` sets the compression of the file.
200+
- `decompress_concatenated` flags whether to use decompress concatenated file compression.
201+
- `encoding` sets the encoding used to open the resource.
202+
193203
##### `put_map`
194204

195205
Defines an internal map for lookup from key/value pairs.

0 commit comments

Comments
 (0)