Skip to content

Csv

Parse CSV from field text.

Transform json

actions:
- csv: {}
JSON
{
"actions": [
{
"csv": {}
}
]
}

A ✓ marks a field that accepts a context variable such as {{ VARIABLE }}.

Field Type Required Description
description string describe this step.
condition lua-expression (string) Only run this action if the specified condition is met.
Examples: 2 * count()
delim string Override the default delimiter, which is a comma.
suppress-warnings boolean (bool) Suppress warnings generated by this action.
Default: false
input-field field (string) Field containing CSV data, default is ‘_raw’.
Examples: data_field
remove boolean (bool) Remove the field containing the value.
Default: false
relaxed-schema boolean (bool) Allow picking & naming just the first few fields.
Default: false
header boolean (bool) Whether to treat first line as a CSV header.
Default: false
gen-headers boolean (bool) Whether to generate automatic CSV headers.
Default: false
autoconvert boolean (bool) Force auto-conversion into numbers wherever possible.
Default: true
skip-lines number (integer) Skip a fixed number of leading lines before parsing.
Examples: 42, 1.2e-10
header-regex regex (string) Treat the first line matching this pattern as the header row.
Examples: \d+[A-Z]*
persist-header boolean (bool) Persist the most recent header across subsequent files or documents.
Default: false
fields map (string) Specify fields and their types (str, num, bool, num).
field-file path (string) A file containing the fields as name:type.
Examples: /path/to/file, c:\users\joe\data\file.txt
header-fields Header Fields Detailed control of how headers are defined.
Field Type Required Description
header-field field (string) Field containing header (CSV column names).
Examples: data_field
header-field-types boolean (bool) Field containing header has types specified (with name:type format).
Default: false
header-field-on-change boolean (bool) With ’header-field, only write out headers if columns change.<br>Default: false`
null-value string A subSstitute string value to be used in the event that a field is null.
Field Type
event.field str

Key format: field.