Skip to content

CSV

CSV (csv)

Parse CSV from field text.

Transform json

Minimal example

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

Contents

Fields

FieldTypeRequiredDescription
descriptionstringdescribe this step.
conditionlua-expression (string)Only run this action if the specified condition is met.
Examples: 2 * count()
delimstringOverride the default delimiter, which is a comma.
suppress-warningsboolean (bool)Suppress warnings generated by this action.
input-fieldfield (string)Field containing CSV data, default is ‘_raw’.
Examples: data_field
removeboolean (bool)Remove the field containing the value.
relaxed-schemaboolean (bool)Allow picking & naming just the first few fields.
headerboolean (bool)Whether to treat first line as a CSV header.
gen-headersboolean (bool)Whether to generate automatic CSV headers.
autoconvertboolean (bool)Force auto-conversion into numbers wherever possible.
skip-linesnumber (integer)Skip a fixed number of leading lines before parsing.
Examples: 42, 1.2e-10
header-regexregex (string)Treat the first line matching this pattern as the header row.
Examples: \d+[A-Z]*
persist-headerboolean (bool)Persist the most recent header across subsequent files or documents.
fieldsmap (string)Specify fields and their types (str, num, bool, num).
field-filepath (string)A file containing the fields as name:type.
Examples: /path/to/file, c:\users\joe\data\file.txt
header-fieldsHeader FieldsDetailed control of how headers are defined.

Schema

Header Fields Fields

FieldTypeRequiredDescription
header-fieldfield (string)Field containing header (CSV column names).
Examples: data_field
header-field-typesboolean (bool)Field containing header has types specified (with name:type format).
header-field-on-changeboolean (bool)With ‘header-field`, only write out headers if columns change.
null-valuestringA subSstitute string value to be used in the event that a field is null.

Fields Table

FieldType
event.fieldstr

Key format: field.