All Products
Search
Document Center

MaxCompute:Install and start client

Last Updated:Mar 26, 2026

The MaxCompute client (odpscmd) is a command-line interface (CLI) that runs on your local machine. Use it to run SQL statements, manage resources, and interact with MaxCompute projects directly from the terminal.

Prerequisites

Before you begin, ensure that you have:

Limitations

  • Client V0.28.0 and later: Support Java Development Kit (JDK) 1.8 and JDK 1.9.

  • Client earlier than V0.28.0: Supports JDK 1.8 only.

  • Client V0.27.0 and later: Support the MaxCompute V2.0 data type edition, which is the recommended edition. See MaxCompute V2.0 data type edition.

Install and configure the client

Step 1: Download the installation package

Download the latest odpscmd_public.zip from the MaxCompute client releases page on GitHub.

Note

If you cannot access GitHub, download odpscmd_public_0.48.0.zip directly.

Step 2: Extract the package

Extract odpscmd_public.zip. The package contains four folders: bin, conf, lib, and plugins.

Step 3: Configure odps_config.ini

Open conf/odps_config.ini. Lines starting with # are comments.

The following is a minimal working configuration. Replace the placeholder values before starting the client:

# The name of the MaxCompute project to connect to.
# For workspaces in standard mode, development environment project names end with _dev.
# To find your project name: log in to the MaxCompute console, go to Workspace > Projects.
project_name=<your-project-name>

# AccessKey ID of your Alibaba Cloud account or RAM user.
# To get your AccessKey ID: click your profile picture in the MaxCompute console, then select AccessKey Management.
access_id=<your-accesskey-id>

# AccessKey secret corresponding to the AccessKey ID above.
access_key=<your-accesskey-secret>

# Endpoint of the MaxCompute service.
# This is the MaxCompute service endpoint, not the MaxCompute Tunnel endpoint.
# Choose the endpoint that matches your project region and network type.
# See Endpoints: https://www.alibabacloud.com/help/en/document_detail/34951.html
end_point=http://service.cn-hangzhou.maxcompute.aliyun.com/api
Important

Invalid parameter values cause a project connection failure — double-check all required parameters before starting the client.

The following optional parameters are available:

ParameterDescriptionExample
log_view_hostLogView URL for viewing job runtime information and troubleshooting errors. Recommended: set to http://logview.odps.aliyun.com. Without this parameter, you cannot identify the cause of job failures.http://logview.odps.aliyun.com
https_checkEnables HTTPS encryption for requests. Default: False.True
data_size_confirmMaximum input data size in GB. You can set this parameter to any value. Recommended: 100.100
update_urlReserved. Leave blank.
use_instance_tunnelUses InstanceTunnel to download SQL execution results. Default: False.True
instance_tunnel_max_recordMaximum number of records returned for SQL results. Required when use_instance_tunnel is True. Maximum: 10000.10000
tunnel_endpointPublic endpoint of MaxCompute Tunnel. If not set, traffic is automatically routed to the Tunnel endpoint matching your network. See Endpoints.http://dt.cn-hangzhou.maxcompute.aliyun.com
set.<key>MaxCompute project properties. See Properties.set.odps.sql.decimal.odps2=true

Start the client

Windows

Navigate to the bin folder, then choose one of the following methods:

  • Double-click odpscmd.bat to start the client in a new window.

  • Run from the command prompt: go to the bin folder and run:

    odpscmd

macOS

Navigate to the bin folder, then choose one of the following methods:

  • Double-click odpscmd in Finder to start the client.

  • Run from the terminal: go to the bin folder and run:

    sh odpscmd

Linux

In a terminal, go to the bin folder and run:

sh odpscmd
Note

On Ubuntu, sh odpscmd may return an error. Run ./odpscmd instead.

Verify the connection

If the information shown in the following figure is returned, the MaxCompute project is connected.

MaxCompute client startup output showing a successful project connection

To pass startup parameters when launching from the CLI, see Specify startup parameters.

What's next

After connecting to your MaxCompute project, you can:

References