Export a dataset
export_datasetExport a generated dataset as a file. Returns a `download_url` the person can open (or you can
fetch, e.g. with curl) for as long as the dataset is held (2 hours; 14 days for a signed-in caller).
Give the person the link rather than pasting file contents into the chat.
For a platform that pulls tables itself, pass `per_table=True` (or `table` for one): format json,
jsonl or csv, and each table comes back as its own unzipped link with its row count and the
manifest that types every column. A link pages with `offset` and `limit` (at most 100,000 rows a
page), says `X-Total-Rows`, names the next page in `Link`, and is good until `expires_at`.
Args:
dataset_id: from a prior generate_dataset call.
format: data: csv, parquet, jsonl, json, avro, xlsx, feather, orc, sqlite, duckdb, sql.
code and docs: dbt, notebook, dictionary, dbml, mermaid, prisma, sqlalchemy,
typescript, jsonschema, expectations, django, openapi, mockapi.
`sql` is schema.sql (DDL with keys) + data.sql (COPY/INSERT) — the way to seed a
real database: run the returned SQL through your own database connection, since
this server never holds a database credential itself.
`demo` is the handover for a demo or an eval: the database with a one-step loader,
the ER diagram, answer_key.json (every number by month), questions.jsonl and
the proof of each request.
`raw` is each table as its source systems sent it, for a dataset built from a
blueprint: drops by period in each period's shape, re-sends and soft deletes, with
staging.sql that reads them back into the clean tables.
`salesforce` and `hubspot` are the tables as that CRM's own objects, one CSV per
object in load order with every lookup by an external id, a manifest and a README
on loading it (Bulk API 2.0 upserts; HubSpot batch upserts with associations).
dialect: for `sql`: postgres, mysql, sqlite, mssql, oracle, bigquery, snowflake, clickhouse
(MergeTree tables; above 500k rows, typed Parquet with load.sql). For `demo`:
postgres (psql) or clickhouse (Parquet loaded with clickhouse-client).
inline: also return the file itself as `base64` (only for files under a few MB). Use it
when you must write the file yourself and cannot fetch a URL.
table: one table as its own link (json, jsonl or csv).
per_table: every table as its own link (json, jsonl or csv).
Returns:
filename, content_type, bytes, download_url, expires_at (unix seconds), and `base64` when
`inline` and small enough. Per table: format, expires_at, manifest, and tables {name: {rows, url}}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dataset_id": "<dataset_id>"
},
"name": "export_dataset"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | No | ||
| format | No | csv | |
| inline | No | ||
| dialect | No | postgres | |
| per_table | No | ||
| dataset_id | Yes |