csv

Parses comma-separated value data into individual fields

Decoder usage

Synopsys

codec => csv {
}

Available settings

Setting Type Info Default value
charset string "UTF-8"
separator string ","
autogenerate_column_names bool true
quote_char string "\""
columns array []
comment string ""

Details

charset

  • Value type is string
  • Default value is "UTF-8"
  • One of "US-ASCII" "ISO-8859-1" "latin1" "arabic" "hebrew" "Shift_JIS" "EUC-KR" "ISO-2022-JP" "ISO-8859-15" "IBM869" "windows-1252" ...

    See the IANA registry for more details

    separator

  • Value type is string
  • Default value is ","
  • Define the column separator value. If this is not specified, the default is a comma ,. Optional

    autogenerate_column_names

  • Value type is bool
  • Default value is true
  • Define whether column names should autogenerated or not. Defaults to true. If set to false, columns not having a header specified will not be parsed.

    quote_char

  • Value type is string
  • Default value is "\""
  • Define the character used to quote CSV fields. If this is not specified the default is a double quote “. Optional.

    columns

  • Value type is array
  • Default value is []
  • Define a list of column names (in the order they appear in the CSV, as if it were a header line).

    If columns is not configured, or there are not enough columns specified, the default column names are “column1”, “column2”, etc.

    In the case that there are more columns in the data than specified in this column list, extra columns will be auto-numbered: (e.g. “user_defined_1”, “user_defined_2”, “column3”, “column4”, etc.)

    comment

  • Value type is string
  • Default value is ""
  • Define the comment character. Lines beginning with the Comment character without preceding whitespace are ignored.

    Full configuration blueprint

    Expand me...