Feature Support: Data Loading and Unloading
Feature Support: Data Loading and Unloading
This document outlines the features of various data loading and unloading methods supported by StarRocks.
File formatβ
Loading file formatsβ
| Data Source | File Format | |||||||
|---|---|---|---|---|---|---|---|---|
| CSV | JSON [3] | Parquet | ORC | Avro | ProtoBuf | Thrift | ||
| Stream Load | Local file systems, applications, connectors | Yes | Yes | To be supported | To be supported | To be supported | ||
| INSERT from FILES | HDFS, S3, OSS, Azure, GCS, NFS(NAS) [5] | Yes (v3.3+) | To be supported | Yes (v3.1+) | Yes (v3.1+) | Yes (v3.4.4+) | To be supported | |
| Broker Load | Yes | Yes (v3.2.3+) | Yes | Yes | To be supported | |||
| Routine Load | Kafka | Yes | Yes | To be supported | To be supported | Yes (v3.0+) [1] | To be supported | To be supported |
| Spark Load | Yes | To be supported | Yes | Yes | To be supported | |||
| Connectors | Flink, Spark | Yes | Yes | To be supported | To be supported | To be supported | ||
| Kafka Connector [2] | Kafka | Yes (v3.0+) | To be supported | To be supported | Yes (v3.0+) | To be supported | ||
| PIPE [4] | Consistent with INSERT from FILES | |||||||
[1], [2]: Schema Registry is required.
[3]: JSON supports a variety of CDC formats. For details about the JSON CDC formats supported by StarRocks, see JSON CDC format.
[4]: Currently, only INSERT from FILES is supported for loading with PIPE.
[5]: You need to mount a NAS device as NFS under the same directory of each BE or CN node to access the files in NFS via the file:// protocol.
JSON CDC formatsβ
| Stream Load | Routine Load | Broker Load | INSERT from FILES | Kafka Connector [1] | |
|---|---|---|---|---|---|
| Debezium | To be supported | To be supported | To be supported | To be supported | Yes (v3.0+) |
| Canal | To be supported | ||||
| Maxwell | |||||
[1]: You must configure the transforms parameter while loading Debezium CDC format data into Primary Key tables in StarRocks.
Unloading file formatsβ
| Target | File format | |||||
|---|---|---|---|---|---|---|
| Table format | Remote storage | CSV | JSON | Parquet | ORC | |
| INSERT INTO FILES | N/A | HDFS, S3, OSS, Azure, GCS, NFS(NAS) [3] | Yes (v3.3+) | To be supported | Yes (v3.2+) | Yes (v3.3+) |
| INSERT INTO Catalog | Hive | HDFS, S3, OSS, Azure, GCS | Yes (v3.3+) | To be supported | Yes (v3.2+) | Yes (v3.3+) |
| Iceberg | HDFS, S3, OSS, Azure, GCS | To be supported | To be supported | Yes (v3.2+) | To be supported | |
| Hudi/Delta | To be supported | |||||
| EXPORT | N/A | HDFS, S3, OSS, Azure, GCS | Yes [1] | To be supported | To be supported | To be supported |
| PIPE | To be supported [2] | |||||
[1]: Configuring Broker process is supported.
[2]: Currently, unloading data using PIPE is not supported.
[3]: You need to mount a NAS device as NFS under the same directory of each BE or CN node to access the files in NFS via the file:// protocol.
File format-related parametersβ
Loading file format-related parametersβ
| File format | Parameter | Loading method | ||||
|---|---|---|---|---|---|---|
| Stream Load | INSERT from FILES | Broker Load | Routine Load | Spark Load | ||
| CSV | column_separator | Yes | Yes (v3.3+) | Yes [1] | ||
| row_delimiter | Yes | Yes [2] (v3.1+) | Yes [3] (v2.2+) | To be supported | ||
| enclose | Yes (v3.0+) | Yes (v3.0+) | Yes (v3.0+) | To be supported | ||
| escape | ||||||
| skip_header | To be supported | |||||
| trim_space | Yes (v3.0+) | |||||
| JSON | jsonpaths | Yes | To be supported | Yes (v3.2.3+) | Yes | To be supported |
| strip_outer_array | ||||||
| json_root | ||||||
| ignore_json_size | To be supported | |||||
[1]: The corresponding parameter is COLUMNS TERMINATED BY.
[2]: The corresponding parameter is ROWS TERMINATED BY.
[3]: The corresponding parameter is ROWS TERMINATED BY.
Unloading file format-related parametersβ
| File format | Parameter | Unloading method | |
|---|---|---|---|
| INSERT INTO FILES | EXPORT | ||
| CSV | column_separator | Yes (v3.3+) | Yes |
| line_delimiter [1] | |||
| enclose | Yes | No | |
| escape | Yes | No | |
| include_header | Yes | No | |
[1]: The corresponding parameter in data loading is row_delimiter.
Compression formatsβ
Loading compression formatsβ
| File format | Compression format | Loading method | ||||
|---|---|---|---|---|---|---|
| Stream Load | Broker Load | INSERT from FILES | Routine Load | Spark Load | ||
| CSV |
| Yes [1] | Yes [2] | To be supported | To be supported | To be supported |
| JSON | Yes (v3.2.7+) [3] | To be supported | N/A | To be supported | N/A | |
| Parquet |
| N/A | Yes [4] | To be supported | Yes [4] | |
| ORC | ||||||
[1]: Currently, only when loading CSV files with Stream Load can you specify the compression format by using format=gzip, indicating gzip-compressed CSV files. deflate and bzip2 formats are also supported.
[2]: Broker Load does not support specifying the compression format of CSV files by using the parameter format. Broker Load identifies the compression format by using the suffix of the file. The suffix of gzip-compressed files is .gz, and that of the zstd-compressed files is .zst. Besides, other format-related parameters, such as trim_space and enclose, are also not supported.
[3]: Supports specifying the compression format by using compression = gzip.
[4]: Supported by Arrow Library. You do not need to configure the compression parameter.