Updated on 2025-09-19 GMT+08:00

Data Migration to DWS

You can import data from different sources to DWS. For details, see Figure 1. The features of each method are listed in Table 1. You can select a method as required. To optimize your data migration and ETL process, we suggest using Cloud Data Migration (CDM) and DataArts Studio in combination. CDM specializes in batch data migration, while DataArts Studio offers a visually intuitive development environment and seamlessly manages the entire ETL process.

Figure 1 Data migration
  • CDM, OBS, DLI, and MRS are cloud services.
  • GDS, DSC, and gs_restore, and gs_dump are internal tools.
Table 1 Import methods

Import Method

Data Source

Description

Advantage

Importing Data from OBS in Parallel

OBS

You can import data in TXT, CSV, ORC, or CarbonData format from OBS to DWS for query, and can remotely read data from OBS.

It is recommended for DWS.

This method features high performance and flexible scale-out.

Using GDS to Import Data from a Remote Server

Servers (remote servers)

You can use the GDS tool provided by DWS to import data from the remote server to DWS in parallel. Multiple DNs are used for the import. This method is efficient and applicable to importing a large amount of data to the database.

Importing Data from MRS to a Cluster

MRS (HDFS)

You can configure a DWS cluster to connect to an MRS cluster. In DWS, read data from the HDFS of MRS.

This method features high performance and flexible scale-out.

GDS-based Cross-Cluster Interconnection

-

GDS is used for data transit to implement data synchronization between multiple clusters.

This method is available for data synchronization between multiple DWS clusters.

Using a gsql Meta-Command to Import Data

Local files

Unlike the SQL COPY statement, the \copy command can read data from or write data into only local files on a gsql client.

This method is easy to operate and suitable for importing a small amount of data to the database.

Using COPY FROM STDIN to Import Data

Other files or databases

When you use Java to develop applications, the CopyManager interface of the JDBC driver is invoked to write data from files or other databases to DWS.

Data is directly written from other databases to DWS. Service data does not need to be stored in files.

Importing Kafka Data to DWS in Real Time

Kafka

You can use DLI Flink jobs to import Kafka data to DWS in real time.

This method enables Kafka real-time data import.

Using CDM to Migrate Data to DWS

Databases, NoSQL, file systems, and big data platforms

CDM can migrate various types of data in batches between homogeneous and heterogeneous data sources. CDM migrates data to DWS using the copy method or the GDS parallel import method.

This method supports data import from abundant data sources and is easy-to-operate.

Using DSC to Migrate SQL Scripts

Databases, NoSQL, file systems, and big data platforms

For details, see the documents of the third-party ETL tool.

DWS provides the DSC tool to migrate Teradata/Oracle scripts to DWS.

Provides abundant data sources and powerful data conversion capabilities through OBS.

Using gs_dump and gs_dumpall to Export Metadata

  • Plain text
  • Custom
  • Directory
  • .tar

gs_dump exports a single database or its objects. gs_dumpall exports all databases or global objects in a cluster.

To migrate database information, you can use a tool to import the exported metadata to a target database.

This method is applicable to metadata migration.

Using gs_restore to Import Data

SQL, TMP, and TAR file formats

During database migration, you can export files using gs_dump tool and import them to DWS by using gs_restore. In this way, metadata, such as table definitions and database object definitions, can be imported. The following definitions need to be imported:

  • All database objects
  • A single database object
  • A single schema
  • A single table