> Documentation index: https://docs.beetl.io/llms.txt

# Export

> CSV, and only CSV, up to 1,000 rows.

Source: https://docs.beetl.io/query/export/
Last updated: 2026-10-03

A query result keeps at most 1,000 rows, and everything that reads a result stops there, the CSV
download included. To get more, write the data to a dataset first; see
[More than 1,000 rows](#more-than-1000-rows).

## Download a result as CSV

Press CSV in the result header, from either the table or the chart view. The file is named
`query-result-<result_id>.csv` and holds:

* a header row with the column names,
* every stored row of the result, not only the rows loaded on screen,
* values written as text, comma-separated and quoted where needed,
* an empty field for each `null`.

The file is UTF-8. For a result with the preview label, the CSV has the first 1,000 rows, not the
total the header reports. Only you can download your results, and only until they expire after 7
days. The CSV button appears wherever a result opens, chat included. See [Query results](https://docs.beetl.io/concepts/query-results).

## Copy a drill query

A drill-down opens the records behind a value as a new result, under a Records behind this value
banner. Copy drill query on that banner copies the SQL Beetl generated to select those records. It
ends with a `LIMIT`, so the drill-down holds at most 1,000 rows like any other result. Paste the SQL
into a pipeline stage without the `LIMIT` to write every matching record to a dataset. See
[Lineage and drill-down](https://docs.beetl.io/query/lineage).

## More than 1,000 rows

| You need                   | Do this                                                                                                                         |
| -------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| A number or summary        | Aggregate in SQL (`GROUP BY`, `COUNT`, `SUM`) so the answer fits in one result.                                                 |
| The full rows inside Beetl | Turn the query into a [pipeline](https://docs.beetl.io/pipelines) that writes a dataset. Datasets do not expire.                                     |
| The full rows as files     | Download them in slices: order by a unique key and add `LIMIT 1000 OFFSET 0`, then `OFFSET 1000`, and so on, one CSV per slice. |
| The rows in your own tools | Have a pipeline write the dataset to your own bucket, then read the Delta Lake table there with any Delta reader.               |

For the last route, a TenantAdmin adds your bucket and chooses Use as Beetl storage on it, so new
datasets are written there (see
[Tenants and roles](https://docs.beetl.io/concepts/tenants-and-roles#where-your-data-is-stored)). A dataset stays in the
store it was first written to, so this applies to datasets created afterwards. The details pane on
Home shows each dataset's storage location.

## Dashboards

Charts you want to keep and share belong in Superset dashboards. If your tenant has dashboards set
up, Superset reads your datasets directly instead of a saved result, so a dashboard chart is not
cut to the 1,000 rows a result keeps. Build the dataset you want to show with a pipeline, then
chart it in Superset. See [Dashboards and BI](https://docs.beetl.io/dashboards).

## Over MCP

An MCP client reads data through the same results. `execute_query` runs the SQL and returns the
first page of rows with a `result_id`, `total_rows`, `has_more_rows` and `next_page_offset`.
`get_query_result` takes the `result_id`, a `page_offset` and an optional `page_limit` of up to 50,
and returns the next page without running the SQL again. A page can hold fewer than 50 rows when
the rows are wide, so always continue from `next_page_offset`.

Paging stops at the 1,000 stored rows, and a result belongs to the user whose API key ran it. For
larger reads, use the routes above. See [MCP setup](https://docs.beetl.io/mcp/setup).

## Related

- [Query results](https://docs.beetl.io/concepts/query-results): The 1,000-row limit, ownership and retention.

- [The SQL editor](https://docs.beetl.io/query/sql-editor): Running a query and reading its result.
