Copy Results to External Storage
- Capella Columnar
- concept
In Capella Columnar, you can write query results or entire collections to an external file system or data store. This feature supports exporting data to an external cloud data store in JSON format.
Use Cases
In Capella Columnar, you can write the results of a query to an external data store, or copy an entire collection to a data store. To provide access to the data store, you use an external link to supply the credentials for accessing the data store. See Set Up an External Data Source.
Example uses of this feature include:
-
Query to join several collections or views, or to invoke built-in or user-defined functions, and then write the results to storage outside of Capella Columnar services. Subsequently, you could define an external collection in Capella Columnar to query that stored data.
-
Move a specified collection from Capella Columnar to cloud storage. For example, copy the contents of a standalone collection or a remote Couchbase collection to a data store.
-
Use a query to transform data stored in an external collection, then write the results back to that same store.
When you write a collection or query results to an external data store, you specify the destination path. You can optionally specify partitioning, ordering, and whether to apply compression.
Structuring the data on the external store is helpful in use cases where you plan to directly query the data there later, and to use dynamic prefixes to optimize those queries.
The target directory that you specify in the destination path must be empty. The operation fails if the target directory is not empty. |
COPY TO Statements
For information about writing COPY TO
statements, see COPY TO External Data Store Statements.