Updated on 2023-10-23 GMT+08:00

Planning Data Export

Scenarios

Before you use GDS to export data from a cluster, prepare data to export and plan the export path.

Planning an Export Path

  • Remote mode
  1. (Optional) Create a user and a user group. The user is used to start GDS and must have the write permission on the directory for storing data files.

    groupadd gdsgrp
    useradd -g gdsgrp gdsuser

    If the following information is displayed, the user and user group already exist. Skip this step.

    useradd: Account 'gdsuser' already exists.
    groupadd: Group 'gdsgrp' already exists.

  2. Create the /output_data directory for storing exported data files.

    mkdir -p /output_data

  3. Change the directory owner to gdsuser.

    chown -R gdsuser:gdsgrp /output_data 

  • Local mode
  1. Create the /output_data directory for storing data files on each DN in the cluster.

    mkdir -p /output_data

  2. Change the directory owner to omm.

    chown -R omm:dbgrp /output_data 

  3. Set location to a local path. You do not need to specify the file name.

    For example, to store data files to the /output_data/ directory, set the location parameter to file:///output_data/ when you create a foreign table.