mirror of
https://github.com/lancedb/lancedb.git
synced 2026-10-16 16:52:34 +00:00
This PR is part of the documentation revamp. Once the full set of PRs is merged, we’ll publish the combined site to staging for review before updating docs.lancedb.com. The curation, SQL and operations pages contain outdated claims and examples that do not reliably work as written. This corrects those pages against the reviewed SDK and local server evidence, including prepared statements, background jobs, cleanup and monitoring. Integration guides are grouped with their examples in #4533. Function and Secret-object documentation stays unpublished until its release. The two Function pages are listed in `.mintignore` and left out of the navigation, and the sections about them on other pages are MDX comments. Stacked on #4533. Each MDX file has one PR owner. Rebase onto main after #4533 is squash-merged. Local assembly, Mint validation and link checks pass, and the assembled site shows no Function or Secret-object content. A local release rehearsal that uncomments the drafts and restores the navigation also passes. Hold publication until this PR and lancedb/sophon#8688 are on `main`.
28 lines
855 B
Plaintext
28 lines
855 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>
|
|
Recent 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>
|