Data Import Overview

Updated at:

ApsaraDB for SelectDB supports various data import methods, including native interfaces and ecosystem tools. These methods are suitable for a wide range of scenarios, from real-time data streams to offline batch processing. This topic describes the core interfaces and tools for importing data into SelectDB.

Recommendations for data import

  • For source data from the Alibaba Cloud ecosystem: DTS and DataWorks

  • For source data from outside the Alibaba Cloud ecosystem:

  • For large-scale data:

    • Import interfaces: For Kafka data sources, use Routine Load. For other data sources, use Stream Load.

    • Import tools: For MySQL data sources within the Alibaba Cloud ecosystem, use DTS. For MySQL data sources outside the Alibaba Cloud ecosystem and for non-MySQL data sources, use Flink.

For an overview of more interfaces and tools, see Import interfaces and Import tools below.

Import interfaces

Interface

Features

Supported data formats

Scenarios

Procedure

Stream Load (Recommended)

  • Transfers data over HTTP.

  • Synchronous interface that returns results immediately after the request is complete.

CSV, JSON, PARQUET, or ORC

Import local files or data streams into SelectDB in real time or in batches.

Stream Load

Routine Load

Processes data streams in real time.

CSV or JSON

A longtime job continuously reads data from a specified data source and imports it into SelectDB.

Note

Currently, only Kafka data sources are supported.

Routine Load

Broker Load

  • Imports up to hundreds of GB of data in a single job.

  • Asynchronous interface.

CSV, PARQUET, or ORC

Reads data from remote storage systems such as OSS, Hadoop Distributed File System (HDFS), and S3, and imports the data into SelectDB.

Broker Load

OSS Load

  • Transfers data over an internal network to reduce public bandwidth consumption.

  • Supports hundreds of GB of data per job.

CSV, PARQUET, or ORC

Imports data from Alibaba Cloud OSS into SelectDB.

OSS Load

Insert Into

The insert into values statement has low performance. Do not use it in a production environment.

Reads data from database tables. No file formats are involved.

  • Insert Into Values is suitable for scenarios where a very small amount of data is imported into SelectDB and the request frequency is no more than once every 5 minutes.

  • Insert Into Select is suitable for processing data from within SelectDB or from an external data lake and then importing the results into a new table in SelectDB. This method is highly efficient.

Insert Into

Import tools

Tool

Features

Supported data sources

Incremental data

Historical data

Scenarios

Procedure

DataWorks

End-to-end management: Integrates task scheduling, data monitoring, and kinship analysis. Supports seamless integration with the Alibaba Cloud ecosystem.

  • MySQL

  • Alibaba Cloud ClickHouse

  • StarRocks

Not supported

Supported

Enterprise-level data integration and complex data link scenarios that require task orchestration and monitoring.

Import data using DataWorks

DTS

Real-time synchronization: Supports data migration with latency at the second level. Provides features such as resumable uploads and data validation to ensure migration reliability.

  • MySQL

  • PostgreSQL

Supported

Supported

Real-time synchronization for cross-cloud or hybrid cloud databases. Scenarios that require highly reliable migration.

Import data using DTS

X2Doris

One-click migration: Automatically synchronizes the source table schema. Provides a web-based visualization interface to simplify the migration process from disparate data sources.

  • Doris

  • Hive

  • Kudu

  • StarRocks

  • ClickHouse

Not supported

Supported

Migrate from disparate data sources to SelectDB to reduce migration complexity.

Import data using X2Doris

Flink

Unified stream and batch processing: Supports real-time stream processing with Exactly-Once semantics. Integrates computing and import for complex extract, transform, and load (ETL) scenarios.

  • MySQL

  • Kafka

  • Oracle

  • PostgreSQL

  • SQL Server

Supported

Supported

Suitable for building a real-time data warehouse. Scenarios that require integrated stream processing and data import.

Import data using Flink

Kafka

High-throughput pipeline: Supports terabyte-level data buffering. Provides persistence and multi-replica mechanisms to prevent data loss.

  • Kafka

Supported

Supported

Asynchronous data pipeline scenarios. Decouples producers and consumers to buffer high-concurrency data.

Import data using Kafka

Spark

Distributed computing: Uses the Spark engine for parallel processing of massive data. Supports flexible conversion between SQL and DataFrames.

  • MySQL

  • PostgreSQL

  • HDFS

  • S3

Supported

Supported

Large-volume ETL processing. Offline import scenarios that require computing logic, such as SQL or DataFrames.

Import data using Spark

DataX

Plugin-based architecture: Supports extensions for more than 20 data sources. Provides offline batch synchronization for enterprise-level migration from heterogeneous data sources.

  • MySQL

  • Oracle

  • HDFS

  • Hive

  • ODPS

  • HBase

  • FTP

Not supported

Supported

Offline batch synchronization for heterogeneous data sources. Scenarios that require highly extensible plugins.

Import data using DataX

SeaTunnel

Lightweight ETL: A configuration-driven pattern simplifies development. Supports real-time Change Data Capture (CDC) and is compatible with Flink and Spark engines.

  • MySQL

  • Hive

  • Kafka

Supported

Supported

Simple configuration-driven CDC and lightweight real-time synchronization scenarios.

Import data using SeaTunnel

BitSail

Multi-engine adaptation: Supports multiple computing frameworks such as MapReduce and Flink. Provides a data sharding strategy to optimize import efficiency.

  • MySQL

  • Hive

  • Kafka

Supported

Supported

Data migration scenarios that require flexible switching between computing frameworks, such as Flink and MapReduce (MR).

Import data using BitSail