Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CSVParser functionality ported to filterx:
filterx-func-parse-csv function added with the support of:
It uses the new 'named function arguments' to handle options, so all the option arguments are optional. The only positional argument supported by the function is the target string to be parsed.
known issues:
filterx function framework does not support inline json literals, this way the custom columns argument need to be built in a separate command (see below). however, the interpretation of column's values can not be made on preprocess, so the columns' expression evaluation happens at run time (on every _eval). This will be fixed in the future, since this workaround's performance cost is relative high.
example usage:
filterx { cols = json_array(["foo", "bar", "baz"]); res = parse_csv($MSG, columns=cols, delimiters=",;:", dialect="escape-backslash-with-sequences", greedy=true, strip_whitespace=false); }