Files
lancedb/docs/web/sql/dml/copy.mdx
T
Brendan Clement ac2db48af6 docs: declare where SQL and the SDKs apply
SQL is unavailable in the embedded library and varies on a deployment,
which serves it only when its Flight SQL endpoint is enabled and
reachable, and the SDK has to be told where that is. The page's opening
badge goes. The SDKs page declares both offerings.

Neither SDK aggregates or joins, so the parity tables no longer say they
do, and views can be created through the SDKs on a deployment. Pages that
said vector search has no SQL form now point to the version-dependent
SQL form, and COPY, which newer deployment versions refuse, is marked
as such in the reference.
2026-10-08 21:31:42 -07:00

28 lines
854 B
Plaintext

---
title: "Copy"
sidebarTitle: "Copy"
description: "COPY ... TO — writing a query result to object storage as files."
icon: file-export
keywords: ["copy", "export", "parquet", "sql"]
---
<Warning>
Newer deployment versions refuse `COPY` over the SQL endpoint with "COPY is not
supported". On those, export a result by reading it through a Flight SQL client
or an SDK and writing the files from your application.
</Warning>
```sql
COPY (SELECT id, title FROM documents) TO 's3://bucket/export/' STORED AS PARQUET
```
Writes a query result to object storage. This is the export path when the
consumer is another engine rather than an application -- results land as files
rather than streaming to a client.
## What to read next {#next}
<Card title="Insert" icon="plus" href="/sql/dml/insert">
Bringing rows in, rather than exporting them.
</Card>