GaussDB(DWS) Data Import and Export

GaussDB(DWS) provides a range of solutions to help you import and export data in multiple formats.

Import and Export Tools

      You can choose from the following tools as needed to import data to or export data from GaussDB(DWS).

Table 3-1 Data import and export tools


Batch import or export of a large amount of data


Batch import or export of a small amount of data

copy to/from (file/Stdin)

Export of the query result set

copy query to/from (file/Stdin)

Import or export of a small amount of data to or from other databases

insert into values / ETL

Database metadata backup/restoration


Data import from HDFS

HDFS foreign table

Data import from OBS

OBS text foreign table, OBS ORC foreign table

Data migration/backup between clusters


Gauss Data Service (GDS)

      You can use the Gauss Data Service (GDS) tool to efficiently import and export text.

      As shown in in the following figure, a GDS server is deployed on each physical node in a cluster to import and export data in parallel. The speed of a single node can reach 700 MB/s.

Figure 3-1 Parallel data import and export using GDS

      GDS can work with the Foreign Data Wrapper (FDW), which enables data access across clusters, to help you migrate data from one cluster to another, quickly and easily. As shown in the following figure, GDS sets up a data transfer channel between two clusters. Data can be exported from the source cluster and directly imported to the destination cluster without being written to disks.

Figure 3-2 Cross-cluster data migration


  • Ease of use. You can migrate data by running a single SQL statement: INSERT INTO ... SELECT ... FROM... [WHERE];
  • High performance: The computing power of both clusters can be fully utilized.
  • Data is not written to disks during migration, so it does not occupy disk space.


  • Full data migration between GaussDB(DWS) clusters
  • Partial data migration based on filter conditions between GaussDB(DWS) clusters