---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/copy-from.md
cuppy_section: docs
cuppy_doc: 474S-3X7D
cuppy_doc_uuid: a703c86a-f1f8-4015-b391-8f91e2af93b4
cuppy_permalink: https://cuppy.io/salesforce/d/474S-3X7D
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/copy-from
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: a57dd68e5a3e41d2ecea20750217eab2c52a48949553c303725ef907fead3977
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/copy-from.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

## COPY FROM

**Applies to:** ❌ Data 360 SQL ✅ Tableau Hyper API

Copy data from a file into a table.

where `<option>` can be one of:

`COPY FROM` loads data from a source location into a Hyper table, appending the data to whatever is in the table already.

If a column list is specified, each field in the file is inserted, in order, into the specified column. Table columns not specified in the column list will receive their default values.

Depending on the source location, Hyper will read data, e.g., from a local file or directly from S3. More information on the available locations can be found in [External Locations](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external-location.html).

`<table_name>`
The name (optionally database- or schema-qualified) of an existing table.

`<column_name>`
An optional list of columns to be copied. If no column list is specified, all columns of the table will be copied.

`<source_location>`
Location to read the data from. See [External Location](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external-location.html) documentation for more information.

`FORMAT => format_name`
Selects the data format to be read. This option can be omitted in case the format can be inferred from the file extension. In case of a list of sources, all of them need to share this extension. Supported formats are depicted in detail in [External formats](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external-formats.html).

`format_specific_option => value`
A format-specific option. The available options for each respective format can be found in [External formats](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external-formats.html).

Copy a local CSV file from the working directory of the Hyper server, having a custom delimiter. The schema of the CSV file is expected to be the same as the schema of the table `products`, which must already exist:

Same but reading from multiple CSV files:

Copy from an Apache Parquet file stored on Amazon S3 using empty credentials and inferring the bucket region. The file format is inferred from the file extension:

Same but with explicit Amazon S3 credentials and bucket region:

Files named in a `COPY` command are read directly by the server, not by the client application. Therefore, they must reside on or be accessible to the database server machine, not the client. They must be accessible to and readable by the Hyper user (the user ID the server runs as), not the client.

`COPY` input and output is affected by [date_style](https://tableau.github.io/hyper-db/docs/hyper-api/connection/#date_style).

`COPY` stops operation at the first error.

Hyper also supports the PostgreSQL syntax of the `COPY` command, which is slightly different from the syntax depicted here. This is only supported for PostgreSQL compatibility. When writing SQL for Hyper, we recommend using the syntax documented here.

Issuing a `COPY` is equivalent to an [INSERT](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/insert.html) command that reads from the [`external`](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external.html) function. Furthermore, the `external` function can also be combined with [CREATE TABLE AS](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/create-table-as.html) to concisely create and fill a new Hyper table. For example, this will create and fill a products table:

Also, note that Hyper can directly operate on external formats, and importing the data into Hyper tables is unnecessary for most use cases.

For a discussion of the pros and cons of the various alternatives, see [Reading External Data in SQL](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/external-syntax.html).


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
