Parse text files with custom delimiters and automatically extract structured data for import into Flatfile
;
, :
, ~
, ^
, and #
.
This plugin is useful in scenarios where data is provided in custom formats that are not natively handled by the Flatfile platform’s standard CSV, TSV, or PSV parsers. It operates within a server-side listener, triggering on the file:created
event to process the file, identify headers, and structure the data into records for import.
DelimiterExtractor
function.;
, :
, ~
, ^
, #
.true
, the plugin will attempt to convert numeric and boolean strings into their corresponding types. For example, “123” becomes 123
and “true” becomes true
.true
: Skips lines that are completely empty'greedy'
: Skips lines that contain only whitespace charactersfalse
: Includes all lines, even empty onesdynamicTyping
.delimiter
is not provided. The parser will use the first one that successfully parses the data..txt
file, specifying that the data is separated by a colon:
.data
files with type conversion, empty line handling, and value transformation:
DelimiterExtractor(fileExt, ...)
delimiter
option matches the actual delimiter used in the file.csv
(comma-separated), .tsv
(tab-separated), and .psv
(pipe-separated);
, :
, ~
, ^
, #
DelimiterExtractor
function includes a guard clause that throws an Error
if an unsupported native file type is provideddynamicTyping: false
)skipEmptyLines: false
)chunkSize: 10000
, parallel: 1
)