Statement
COPY INTO writes the results of a query to a file in object storage. Use it to export result sets that are too large to download from the query editor, which returns at most 10,000 rows.
Syntax
Example
Before you start
Files are written as CSV with these settings:
Limitations
- AWS S3 is the only supported destination.
- CSV is the only output format, and files aren’t compressed.
- The path must point to a file. Folder paths such as
s3://sample/unloads/ aren’t supported.
- Exports are written to a single file.
NULL values are written as "" in every column, whatever the column type.
- Dates are written as
YYYY-MM-DD and timestamps as YYYY-MM-DD HH24:MI:SS.
Last modified on October 16, 2026