Skip to main content

Delimited text format

CSV, TSV, and DSV

CSV, TSV, and related delimiter-separated files are simple to transport but varied in headers, quoting, types, and line endings. The CSV module makes those choices explicit and returns the same table shapes used by other loaders.

Structured data boundaries

Keep the source shape. Choose the application shape.

JSON, delimited text, BSON, and XML describe data differently. loaders.gl keeps those input boundaries explicit while letting applications choose documents, tables, features, or trees for the next stage.

Common API boundary

documentbatchstream

load · parse · write

Application results

Documentnested objects and arrays
Tablerows, columns, or Arrow batches
Featuresgeometry plus properties
Treeformat-specific document structure

A readable interchange format can stay readable at the edge, or become a typed table when that is what the application needs.

Delimited data path

Parse as records, batches, or columns.

The parser handles text incrementally and can expose the result in the form that the next operation needs. This is useful for ordinary application logic as well as large imports and browser-side analysis.

Read

Handle delimiters, quoting, headers, and line endings.

Batch

Process records as they arrive with parseInBatches().

Shape

Return row, columnar, or Arrow-compatible tables.

Write

Emit delimited text with controlled columns and options.

Detailed guide

CSV format and API details

The reference below covers dialect options, type inference, streaming, table output, and writer behavior.

Loaders and Writers​

CharacteristicValue
File FormatCSV, TSV, DSV
Data FormatTables
File TypeText
File Extension.csv, .tsv, .dsv
MIME Typestext/csv, text/tab-separated-values, text/dsv