All Products
Search
Document Center

MaxCompute:Import and export table data

Last Updated:Jul 17, 2023

MaxCompute Studio allows you to import local files in the CSV or TSV format to MaxCompute tables. It also allows you to export data from MaxCompute tables to local files. MaxCompute Studio uses MaxCompute Tunnel to import and export data.

Prerequisites

  • MaxCompute Tunnel is configured for your project in MaxCompute Studio. For more information, see Install and configure the MaxCompute client.

  • The account has the permissions to manage tables in your MaxCompute project.

Import data

  1. In the Project Explorer tool window, click the drop-down arrow on the left side of Tables & Views under your MaxCompute project. In the table list, right-click the table to which you want to import data and select Import data into table.

    image.png
  2. In the Importing data to table_name dialog box, configure the parameters.

    image.png
    • Input File: the path of the local file to import.

    • File charset: the encoding format of the input file. Valid values: UTF-8, UTF-16, UTF-16BE, UTF-16LE, ISO-8859-1, US-ASCII, and GBK. Default value: UTF-8.

    • Partition: the partition information. The parameter is applied only for partitioned tables. If a non-partitioned table is used, you do not need to configure this parameter.

    • Column Separator: the column delimiter. Valid values: Comma(','), Space(' '), and Tab('\t'). Default value: Comma(',').

    • Record Limit: the maximum number of data rows that can be imported.

    • Size(MB) Limit: the maximum size of data that can be imported. Unit: MB.

    • Error Record Limit: the maximum number of data rows that contain errors.

    • Include Column Header: specifies whether to import the column header.

  3. Click OK to import the data.

  4. The Success message appears. This indicates that the data is imported. You can view the data in the table.

Export data

  1. In the Project Explorer tool window, click the drop-down arrow on the left side of Tables & Views under your MaxCompute project. In the table list, right-click the table from which you want to export data and select Export data from table.

    导出数据
  2. In the Exporting data from table_name dialog box, configure the parameters.

    导出文件
    • Output File: the path of the local file that stores the output data.

    • File charset: the encoding format of the output file. Valid values: UTF-8, UTF-16, UTF-16BE, UTF-16LE, ISO-8859-1, US-ASCII, and GBK. Default value: UTF-8.

    • Column Separator: the column delimiter. Valid values: Comma(','), Space(' '), and Tab('\t'). Default value: Comma(',').

    • Record Limit: the maximum number of data rows that can be exported.

    • Size(MB) Limit: the maximum size of data that can be exported. Unit: MB.

    • Error Record Limit: the maximum number of data rows that contain errors.

    • Include Column Header: specifies whether to export the column header.

  3. The Success message appears. This indicates that the data is exported. You can view the data in the output file.