Help Center > > Developer Guide> Data Import> Import Modes

Import Modes

Updated at: Dec 30, 2020 GMT+08:00

GaussDB(DWS) provides flexible methods for importing data. You can import data from different sources to GaussDB(DWS). Each method has its own features, as listed in Table 1. You can select a method that meets your requirements.

Table 1 Import modes

Import Mode

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 GaussDB(DWS) for query, and can remotely read data from OBS.

It is recommended for GaussDB(DWS).

This method features high performance and horizontal scaling.

Using GDS to Import Data from a Remote Server

Servers (remote servers)

Use the GDS tool provided by GaussDB(DWS) to import data from the remote server to GaussDB(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.

Importing Data from MRS to a Cluster

MRS (HDFS)

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

This method features high performance and horizontal scaling.

Third-party ETL tool

Databases, NoSQL, file systems, and big data platforms

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

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

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

Running the INSERT Statement to Insert Data

-

If you use an SQL client tool or JDBC/ODBC driver to connect to the GaussDB(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.

Running the COPY FROM STDIN Statement 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 GaussDB(DWS).

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

Using a gsql Meta-Command \copy to Import Data

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.

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

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel