All Products
Search
Document Center

MaxCompute:Use the MaxCompute client or MaxCompute Studio

Last Updated:Jun 25, 2026

MaxCompute client (odpscmd) and MaxCompute Studio both use MaxCompute Tunnel to transfer data. This topic describes how to download MaxCompute table data or SQL query results to a local directory using Tunnel commands in odpscmd or Tunnel SDK in MaxCompute Studio.

Prerequisites

Before you begin, ensure that you have:

  • A MaxCompute project created and connected to the tool. For more information, see Connect to MaxCompute

  • A table created in the MaxCompute project

Usage notes

  • Each download operation targets one table or one partition at a time, and saves data to a single local file.

  • For a partitioned table, specify the partition to download from.

  • For a multi-level partitioned table, specify the lowest-level partition.

Download data using Tunnel commands in odpscmd

Run the Tunnel download command in odpscmd to download table data or the query results of a specified instance to a local directory.

For the full command syntax and options, see the Download section in the Tunnel command reference.

Download data using Tunnel SDK in MaxCompute Studio

Tunnel SDK provides the following interfaces for downloading data:

Interface

Description

TableTunnel

Entry class for table data operations. Use TableTunnel.DownloadSession to download table data.

TableTunnel.UploadSession

Session interface for uploading table data.

InstanceTunnel

Entry class for SQL statement result operations. Use InstanceTunnel.DownloadSession to download the results of a SELECT statement.

SDK behavior varies by version. For version-specific details, see the SDK Java Doc.

For Tunnel SDK details, see Tunnel SDK.

What's next

Explore download examples in the following topics: