Import Modes
GaussDB(DWS) provides flexible methods for importing data. You can import data from different sources to GaussDB(DWS). For details, see Figure 1. Each method has its own features, as listed in Table 1. You can select a method that meets your requirements. It is recommended that Cloud Data Migration (CDM), Data Ingestion Service (DIS), and Data Lake Factory (DLF) services be used to import and export data. CDM is used for batch data migration. DIS is used for stream data ingestion. DLF orchestrates and schedules the entire ETL process and provides a visualized development environment.
| Import Mode | Data Source | Description | Advantage |
|---|---|---|---|
| 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. | |
| 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. | ||
| 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. | |
| 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 GaussDB(DWS) using the copy method or the GDS parallel import method. | Rich data sources and simple operations | |
| Stream data | You can periodically import stream data from DIS to the database of a GaussDB(DWS) cluster. Data is temporarily stored on OBS before being imported to GaussDB(DWS) and will be deleted after it is dumped to GaussDB(DWS). | Quasi-real-time data import | |
| 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. |
| - | 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. | |
| 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. | |
| 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. |
Last Article: Data Import
Next Article: Concurrently Importing Data from OBS

Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.