CSV Parser
The CSV parser is used for parsing incoming CSV data. To use it set decoder
to csv
. Fields can
be mapped to a different name by using the row headers in your schema’s source
.
To get multiple records from a single incoming CSV document, be sure to use an array
schema.
Limitations
The CSV parser currently only works with CSVs that contain a header row.
Example
Incoming data:
first_name,age
Alice,29
Bob,34
Decoder configuration:
decoder: csv
schema:
type: array
items:
type: object
properties:
name:
type: string
source: first_name
age:
type: integer
Output:
- name: Alice
age: 29
- name: Bob
age: 34