• Data Warehouse Service

dws
  1. Help Center
  2. Data Warehouse Service
  3. Developer Guide
  4. Data Import
  5. Import Modes

Import Modes

DWS supports various data import modes, as shown in Table 1.

Table 1 Import modes

Import Mode

Data Source

Description

Advantage

Parallel pulling

OBS

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

It is recommended for DWS

Excellent performance and scale-out

MRS (HDFS)

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

Servers (remote servers)

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 mode is efficient and suitable for importing a large amount of data to the database.

Third-party ETL tool

Databases, NoSQL, file systems, and big data platforms

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

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

INSERT

-

If you use an SQL client tool or JDBC/ODBC driver to connect to the DWS database, you can run the INSERT statement to insert one or more rows of data or to insert data from a specified table.

INSERT is the simplest way to write data. It is applicable to scenarios with small data volume and low concurrency.

CopyManager interface of the JDBC driver

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.

\copy, a meta-command of the gsql client

Local file

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

Simple operations