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 |
| Entry class for table data operations. Use |
| Session interface for uploading table data. |
| Entry class for SQL statement result operations. Use |
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: