Updated on 2024-09-30 GMT+08:00

Exporting DLI Table Data to OBS

You can export data from a DLI table to OBS. During the export, a folder is created in OBS or the content in the existing folder is overwritten.

Precautions

  • The exported file can be in JSON format, and the text format can only be UTF-8.
  • Only the data in the DLI table (the table type is Managed) can be exported to the OBS bucket, and the export path must be specified to the folder level.
  • Data can be exported across accounts. That is, after account B authorizes account A, account A can export data to the OBS path of account B if account A has the permission to read the metadata and permission information about the OBS bucket of account B and read and write the path.

Procedure

  1. You can export data on either the Data Management page or the SQL Editor page.

    • To export data on the Data Management page:
      1. On the left of the management console, choose Data Management > Databases and Tables.
      2. Click the name of the database corresponding to the table where data is to be exported to switch to the Manage Tables page.
      3. Select the corresponding table (DLI table) and choose More > Export in the Operation column. The Export Data page is displayed.
    • To export data on the SQL Editor page:
      1. On the left of the management console, click SQL Editor.
      2. In the navigation tree on the left, click Databases to see all databases. Click the database name corresponding to the table to which data is to be exported. The tables are displayed.
      3. Click on the right of the managed table (DLI table) whose data is to be exported, and choose Export from the shortcut menu.
        Figure 1 Exporting the table

  2. In the displayed Export Data dialog box, specify parameters by referring to Table 1.

    Figure 2 Exporting data
    Table 1 Parameter description

    Parameter

    Description

    Databases

    Database where the current table is located.

    Table Name

    Name of the current table.

    Data Format

    Format of the file storing data to be exported. Formats other than JSON will be supported in later versions.

    Queue

    Select a queue.

    Compression Format

    Compression format of the data to be exported. The following compression formats are supported:

    • none
    • bzip2
    • deflate
    • gzip

    Storage Path

    • Enter or select an OBS path.
    • The export path must be a folder that does not exist in the OBS bucket. Specifically, you need to create a folder in the target OBS directory.
    • The folder name cannot contain the special characters of \/:*? "<>|, and cannot start or end with a dot (.).

    Export Mode

    Storage mode of the data to be exported.

    • New OBS directory: If the specified export directory exists, an error is reported and the export operation cannot be performed.
    • Existing OBS directory (Overwritten): If you create a file in the specified directory, the existing file will be overwritten.

    Table Header: No/Yes

    Whether the data to be exported contains the table header.

  3. Click OK.
  4. (Optional) You can view the job status (indicated by Status), statements (indicated by Statement), and other information about exporting jobs on the SQL Jobs page.

    1. Select EXPORT from the Job Type drop-down list box and specify the time range for exporting data. The jobs meeting the requirements are displayed in the job list.
    2. Click to view details about an exporting job.