SELECT
query directly to an Amazon S3 location using COPY TO. This method is more flexible and efficient than downloading query results manually from the Firebolt Workspace, making it ideal for data sharing, integration, and archival.
COPY TO
to export the result of a SELECT
query from my_table
to a specified Amazon S3 bucket in CSV format using the provided AWS credentials:
Format | Best For | Characteristics | Recommended Use |
---|---|---|---|
CSV (Comma-Separated) | General data exchange, spreadsheets, SQL. | Simple, widely supported, and easy to read. | Best for spreadsheets, databases, or general data exchange. |
TSV (Tab-Separated) | Structured text data. | Like CSV, but uses tabs instead of commas. | Best for Excel, databases, or general data exchange. |
JSON | APIs, web applications, NoSQL databases. | Flexible, human-readable, and supports nested data. | Best for web apps, APIs, or NoSQL integrations. |
PARQUET | Big data processing, analytics workloads. | Compressed, columnar, and optimized for querying. | Ideal for analytics, performance-sensitive workloads, and large datasets. |
user_id
, event_type
, and timestamp
data and headers from the user_events
table to a CSV file in an Amazon S3 bucket:
sales_data
table to an Amazon S3 bucket in Parquet format using the provided AWS credentials:
order_id
and order_details
from the orders
table to an Amazon S3 bucket in JSON format using the provided AWS credentials:
name
, age
, and city
from the customers
table to an Amazon S3 bucket in TSV format using the provided AWS credentials: