Csv
Csv (csv)
Section titled “Csv (csv)”Parse CSV from field text.
Transform json
Minimal example
Section titled “Minimal example”actions: - csv: {}JSON
{ "actions": [ { "csv": {} } ]}Contents
Section titled “Contents”A ✓ marks a field that accepts a context variable such as
{{ VARIABLE }}.
Fields
Section titled “Fields”| 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. |
Schema
Section titled “Schema”Header Fields Fields
Section titled “Header Fields Fields”| 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. |
Fields Table
Section titled “Fields Table”| Field | Type |
|---|---|
event.field |
str |
Key format: field.