Skip to main content

Data Export Overview

Export query results or table data from a VeloDB Cloud warehouse to external storage for downloads and data exchange. Use SELECT INTO OUTFILE for query results, EXPORT for asynchronous table exports, or mysqldump for small SQL dumps on your client.

Export and backup​

Data export produces files such as Parquet, ORC, CSV, or SQL dumps for use in other systems. It does not preserve the complete warehouse configuration, SQL users, permissions, or managed recovery state. Use the warehouse backup and recovery workflow when you need to recover a warehouse.

Server-side export writes to object storage or HDFS that your warehouse can reach. It does not download files to your computer. Download the generated objects with your storage provider's tools, or use mysqldump to write a small SQL dump directly on your client.

Choose an export method​

Choose among these three methods:

  • SELECT INTO OUTFILE: supports exporting any SQL result set.
  • EXPORT: supports exporting partial or full data at the table level.
  • MySQL Dump: writes schemas and small data sets as SQL statements on your client.

Method comparison​

The following table compares the three export methods across execution mode, SQL capabilities, concurrency, and supported formats, helping you choose quickly:

Comparison DimensionSELECT INTO OUTFILEEXPORTMySQL Dump
Synchronous / AsynchronousSynchronousAsynchronous (check progress with SHOW EXPORT after submission)Synchronous
Supports arbitrary SQLSupportedNot supportedNot supported
Export specified partitionsSupportedSupportedNot supported
Export specified tabletsSupportedNot supportedNot supported
Concurrent exportParallel where the query plan allowsParallel tasks for internal tablesOne table at a time
Supported export formatsParquet, ORC, CSVParquet, ORC, CSVSQL statements
Supports external tablesSupportedSupported, without internal-table task splittingNot supported
Supports viewsSupportedSupportedSupported
Supported export locationsS3, HDFSS3, HDFSClient file system

When to use each method​

SELECT INTO OUTFILE​

Suitable for the following scenarios:

  • The exported data needs to go through complex computation logic, such as filtering, aggregation, or joins.
  • Scenarios suitable for executing synchronous tasks.

For detailed usage, see SELECT INTO OUTFILE.

EXPORT​

Suitable for the following scenarios:

  • Single-table export of large data volumes that requires only simple filter conditions.
  • Scenarios that require asynchronous task submission.

For detailed usage, see Export Data Asynchronously.

MySQL Dump​

Suitable for the following scenarios:

  • Compatibility with the MySQL ecosystem, with the need to export both table schemas and data.
  • Use it for development, testing, schemas, or small data volumes. Review generated SQL before importing it.

For detailed usage, see MySQL Dump.

Type mappings for exported files​

Parquet and ORC define their own data types. During export, the query engine converts warehouse data types to the corresponding file types. CSV stores values as text. Verify that the receiving system supports the exported types, especially timestamps and complex values.

The mappings between warehouse data types and the ORC and Parquet formats are listed below.

ORC type mapping​

Warehouse typeORC Type
booleanboolean
tinyinttinyint
smallintsmallint
intint
bigintbigint
largeIntstring
datestring
datev2date
datetimestring
datetimev2timestamp
timestamptztimestamp with local time zone (ORC TIMESTAMP_INSTANT)
varbinarybinary
floatfloat
doubledouble
char / varchar / stringstring
decimaldecimal
structstruct
mapmap
arrayarray
jsonstring
variantstring
bitmapbinary
quantile_statebinary
hllbinary

Parquet type mapping​

Parquet export converts values through Arrow. The mappings are as follows:

Warehouse typeArrow TypeParquet Physical TypeParquet Logical Type
booleanbooleanBOOLEAN
tinyintint8INT32INT_8
smallintint16INT32INT_16
intint32INT32INT_32
bigintint64INT64INT_64
largeIntutf8BYTE_ARRAYUTF8
dateutf8BYTE_ARRAYUTF8
datev2date32INT32DATE
datetimeutf8BYTE_ARRAYUTF8
datetimev2timestampINT96 / INT64TIMESTAMP(MICROS/MILLIS/SECONDS)
floatfloat32FLOAT
doublefloat64DOUBLE
char / varchar / stringutf8BYTE_ARRAYUTF8
decimaldecimal128FIXED_LEN_BYTE_ARRAYDECIMAL(scale, precision)
structstructParquet Group
mapmapParquet Map
arraylistParquet List
jsonutf8BYTE_ARRAYUTF8
variantutf8BYTE_ARRAYUTF8
bitmapbinaryBYTE_ARRAY
quantile_statebinaryBYTE_ARRAY
hllbinaryBYTE_ARRAY

Note:

For Core 26.1.3, Parquet export uses INT96 timestamp encoding by default. For SELECT INTO OUTFILE, enable_int96_timestamps controls this choice. Core 26.1.3 does not accept this property in EXPORT. A future release changes the default to false, which writes logical INT64 timestamps, and adds stricter value validation. Confirm the behavior of your warehouse version before relying on this change. Do not use parquet.enable_int96_timestamps as the property name.

See also​

Enter to send · Shift+Enter for a new line