Output formats
Set the format in output.format and its options in output.options:
version: "1"
output:
language: eng
format: csv
quantity: 100
options: { header: true, delimiter: ";", newline: crlf }
fields:
- { name: id, type: autoint }
- { name: email, type: email }Tabular formats keep the field order of the recipe. Empty values (see emptyRate) are empty cells in CSV, TSV and XLSX, and null in JSON and Parquet. With output.files above 1, the records are split across that many files and delivered as one ZIP.
csv — CSV
Comma-separated values, UTF-8 with a byte-order mark so spreadsheets detect the encoding.
| Parameter | Values | Default | Description |
|---|---|---|---|
header |
boolean | true |
Write the field names as the first row. |
delimiter |
text | — | One-character delimiter. CSV defaults to ,, TSV to a tab. |
newline |
lf, crlf |
lf |
Line ending. |
tsv — TSV
Tab-separated values, UTF-8 with a byte-order mark.
| Parameter | Values | Default | Description |
|---|---|---|---|
header |
boolean | true |
Write the field names as the first row. |
delimiter |
text | — | One-character delimiter. CSV defaults to ,, TSV to a tab. |
newline |
lf, crlf |
lf |
Line ending. |
json — JSON
A JSON array of objects, keys in alphabetical order. person, contact, json and array-valued color fields stay nested.
| Parameter | Values | Default | Description |
|---|---|---|---|
pretty |
boolean | false |
Indent the output. |
root |
text | — | Wrap the records under this key instead of writing a bare list. |
yaml — YAML
A YAML list of mappings. Structured fields stay nested.
| Parameter | Values | Default | Description |
|---|---|---|---|
root |
text | — | Wrap the records under this key instead of writing a bare list. |
xml — XML
One element per record inside a root element. Structured fields are written as compact JSON text.
| Parameter | Values | Default | Description |
|---|---|---|---|
root |
text | records |
Name of the root element. |
record |
text | record |
Name of each record's element. |
sql — SQL
PostgreSQL INSERT statements, one per record.
| Parameter | Values | Default | Description |
|---|---|---|---|
table |
text | data |
Target table. Defaults to output.filename, else data. |
xlsx — Excel (.xlsx)
One worksheet with a header row.
No options.
parquet — Parquet
Columnar Apache Parquet file.
No options.
pdf — PDF
Printable table with fonts that cover non-Latin scripts.
No options.