Skip to main content
Documentation

Supported export formats

Diafunc tables export to 21 formats spanning six categories: tabular, columnar / structured, semi-structured, archive (database files), scientific, and statistical-software. Any registered format can be wrapped with one of four compression algorithms (gzip / bzip2 / xz / zstd) and / or a single-entry archive (zip / tar) to produce e.g. .parquet.gz or .csv.tar.xz.

The live catalogue is served at GET /api/v1/storage/table-exports/supported-formats — the same source of truth the Lab format picker uses for its dropdown and the CLI uses for diafunc table export-formats.

Need to import data into Diafunc? See supported file formats.

Tabular

Row × column tables. CSV / TSV stringify every cell; Excel promotes numeric and boolean columns to native cell types when the column type is declared.

FormatExtensionMIMENotes
CSV.csvtext/csvDefaults: , delimiter, " quote, ? null token. Override via ?delimiter= / ?quote= / ?nullValue= / ?quoteAll=.
TSV.tsvtext/tab-separated-valuesSame as CSV with tab delimiter.
Excel.xlsxapplication/vnd.openxmlformats…Single sheet; numeric / boolean columns get native cell types.

Columnar / structured

Self-describing typed-column formats. Per-column ColumnSpec drives the on-disk type — Parquet / Arrow / ORC / Avro all emit long / double / boolean / string directly rather than stringifying.

FormatExtensionMIMENotes
Parquet.parquetapplication/vnd.apache.parquetSnappy-compressed single file. Single-file output; no partitioning.
Apache Arrow IPC / Feather.arrow .featherapplication/vnd.apache.arrow.fileOne record batch. Requires runtime --add-opens for java.nio.
Apache ORC.orcapplication/vnd.apache.orcVectorizedRowBatch writer.
Avro container.avroapplication/avroIn-memory DataFileWriter; no temp file.

Semi-structured

Document-shaped exports. JSON / JSONL / YAML emit typed scalar values; XML and HTML stringify into element text; PDF renders a paginated visual artifact (not round-trippable as data).

FormatExtensionMIMENotes
JSON.jsonapplication/jsonTop-level array of objects.
JSON Lines / NDJSON.jsonlapplication/x-ndjsonOne JSON object per line.
YAML.yamlapplication/x-yamlSequence of mappings.
XML.xmlapplication/xml<rows><row><col>…</col></row></rows>.
HTML.htmltext/htmlSingle <table> document.
PDF.pdfapplication/pdfPaginated landscape render. Visual artifact — not round-trippable.

Archive (database files)

Single-table database files. The exported table lands as one user table inside the file; queries are immediately runnable with sqlite3 or the DuckDB CLI.

FormatExtensionMIMENotes
SQLite.sqliteapplication/vnd.sqlite3Column types: INTEGER / REAL / BOOLEAN / TEXT.
DuckDB.duckdbapplication/vnd.duckdbColumn types: BIGINT / DOUBLE / BOOLEAN / VARCHAR.

Scientific

Hierarchical scientific-data formats. HDF5 writes a rank-2 /data dataset; NetCDF-4 is HDF5 with the _NCProperties attribute (NetCDF-4 IS HDF5 on disk). Classic CDF-1 / CDF-2 not produced.

FormatExtensionMIMENotes
HDF5.h5application/x-hdf5Rank-2 dataset at /data. Row / column name datasets when set.
NetCDF-4.nc4application/x-netcdfHDF5-delegated; NetCDF-4 readers (Python netCDF4, NCO) read it natively.

Statistical software

Hand-rolled writers mirroring the import-side readers. Round-trip-tested via the matching reader.

FormatExtensionMIMENotes
SAS.sas7bdatapplication/x-sas-dataHand-rolled sas7bdat writer; round-trips via the parso reader.
SPSS.savapplication/x-spss-savUncompressed $FL2; short-string columns only (≤8 bytes).
Stata.dtaapplication/x-stata-dtaRelease 118 (Stata 14+). Numeric→double; strings→str244.
R serialized data.rdsapplication/x-rdsFormat version 2 XDR, gzip envelope. data.frame with logical / integer / double / character columns.

Compression and archive wrappers

Layer on top of any format. Order is format → archive → compression so ?archive=tar&compression=gzip produces a real gzipped tarball (.tar.gz), not a zip-of-gz.

WrapperValuesNotes
Compressiongzip · bzip2 · xz · zstdSame four algorithms as on the import side. Adds .gz / .bz2 / .xz / .zst to the filename.
Archivezip · tarSingle-entry archive. zip carries its own per-entry deflate so ?compression= is ignored when ?archive=zip.

Range slicing and CSV dialect overrides

Optional half-open row / column ranges: ?fromRow=&toRow=&fromColumn=&toColumn=. Out-of-range values clamp to the actual table extent; inverted ranges return 400.

CSV / TSV exports accept dialect overrides: ?delimiter=&quote=&nullValue=&quoteAll=. delimiter and quote are single-character; quoteAll is true by default.