Serialization CsvToIon

Serialization CsvToIon

Certified

Convert a CSV file to the Amazon ION format

Supports configurable field separator, text delimiter, charset, and header detection. The value \N is treated as null in any field. Use onBadLines to control error handling for malformed rows. A leading UTF-8 byte-order mark is stripped automatically. Trailing unnamed header columns (e.g. from a trailing field separator) are dropped by default; set onEmptyHeader to RENAME to keep them with generated names (col_0, col_1, ...) instead.

yaml
type: io.kestra.plugin.serdes.csv.CsvToIon

Convert a CSV file to the Amazon ION format.

yaml
id: csv_to_ion
namespace: company.team

tasks:
  - id: http_download
    type: io.kestra.plugin.core.http.Download
    uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/products.csv

  - id: to_ion
    type: io.kestra.plugin.serdes.csv.CsvToIon
    from: "{{ outputs.http_download.uri }}"
Properties

Source file URI

Defaultfalse

Allow extra characters after a closing quote

DefaultUTF-8

The name of a supported charset

Default,

The field separator character

Defaulttrue

Specifies if the first line should be the header

Default16777216

Maximum CSV parser buffer size (bytes)

Default16777216

Maximum field size (characters)

DefaultERROR
Possible Values
ERRORWARNSKIP

How to handle bad lines (e.g., a line with too many fields)

DefaultDROP
Possible Values
DROPRENAME

How to handle columns whose header name is empty

DROP (default) removes trailing unnamed columns. RENAME keeps every column and names unnamed ones col_0, col_1, ... to avoid losing data.

Defaultfalse

Specifies if empty rows should be skipped

Default0

Number of rows to skip at the start of the file, before the header row is read

Rows are counted at the CSV-record level, not by raw physical line: a quoted field spanning several physical lines counts as a single row. When header is true, skipped rows are removed first and the header is then read from the next row; when header is false, the same number of rows is removed from the start of the data. A negative value is treated as 0. Rows dropped by onBadLines (WARN or SKIP) never reach the skip counter, so a malformed row inside the skip window does not count against skipRows.

Default"

The text delimiter character

Default0

The number of records converted

Formaturi

URI of a temporary result file

Number of records converted