Planning Data Export
Scenarios
Plan the storage location of exported data in OBS.
Planning OBS Save Path and File
You need to specify the OBS path (to directory) for storing data that you want to export. The exported data can be saved to a file in CSV format. The system also supports TEXT so that you can import the exported data to various applications.
The target directory cannot contain any files.
Planning OBS Bucket Permissions
The user used to export data must:
- Have OBS enabled.
- Have the write permission on the OBS bucket where the data export path is located.
You can configure ACL permissions for the OBS bucket to grant the write permission to a specific user.
For details, see Granting Write Permission to OBS Storage Location and OBS Bucket as Planned.
Planning Data to Be Exported and Foreign Tables
You must prepare data to be exported in the database table, and the data volume per row must be less than 1 GB. Based on the data to be exported, plan foreign tables whose attributes such as columns, column types, and length match those of user data.
Granting Write Permission to OBS Storage Location and OBS Bucket as Planned
- Create an OBS bucket and a folder in the OBS bucket as the directory for storing exported data.
- Log in to the OBS management console.
Click Service List and choose Object Storage Service to open the OBS management console.
- Create a bucket.
For details about how to create an OBS bucket, see "OBS Console Operation Guide > Managing Buckets > Creating a Bucket" in the Object Storage Service User Guide.
For example, create two buckets named mybucket and mybucket02.
- Create a folder.
For details about how to create an OBS bucket, see "OBS Console Operation Guide > Managing Objects > Creating a Folder" in the Object Storage Service User Guide.
Example:
- Create a folder named output_data in the mybucket OBS bucket.
- Create a folder named output_data in the mybucket02 OBS bucket.
- Log in to the OBS management console.
- Determine the path of the created OBS folder.
Specify the OBS path for storing exported data files. This path is the value of the location parameter used for creating a foreign table.
The OBS folder path in the location parameter consists of obs://, a bucket name, and a file path. Example:
In this example, the OBS folder path is as follows:
1
obs://mybucket/output_data/
The OBS directory to be used for storing data files must be empty.
- Grant the OBS bucket write permission to the user who wants to export data.
When exporting data, a user must have the write permission on the OBS bucket where the data export path is located. You can configure ACL permissions for the OBS bucket to grant the write permission to a specific user.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.