The ODPS Console is a command-line interface for interacting with Alibaba Cloud's MaxCompute ( formerly ODPS) big data processing platform. It provides a powerful and flexible way to manage and interact with MaxCompute projects, tables, resources, and jobs directly from the terminal.
MaxCompute is a fully managed, serverless data warehousing and analytics platform that allows you to process exabytes of data with high concurrency and throughput. The ODPS Console enables developers, data engineers, and analysts to perform common tasks such as running SQL queries, uploading/downloading data, managing resources, and submitting MapReduce jobs.
The ODPS Console offers a comprehensive set of features organized in a modular plugin architecture:
SQL Execution - Run interactive SQL queries and scripts against MaxCompute tables with support for:
Data Tunnel - High-performance data upload and download between local files and MaxCompute tables with:
MapReduce Jobs - Submit and manage MapReduce jobs on the MaxCompute platform:
Resource Management - Create, update, and delete resources used by MaxCompute functions:
Workflow Management - Execute and monitor XFlow workflows:
Authentication - Secure authentication with multiple credential options:
Volume File System - Manage files in the MaxCompute volume file system:
Cupid Integration - Support for managed service features:
Advanced Table Operations - Comprehensive table management capabilities:
Instance Management - Complete control over job instances:
Project Management - Multi-project support with:
Interactive Mode - Enhanced command-line experience:
bash
wget https://github.com/aliyun/aliyun-odps-console/releases/latest/download/odpscmd_public.zipIf the link above doesn't work, try:
bash
wget https://maxcompute-repo.oss-cn-hangzhou.aliyuncs.com/odpscmd/latest/odpscmd_public.zip
Extract the package:
bash
unzip odpscmd_public.zip
cd odpscmd_public
Verify the installation by checking the directory structure:
bin/ # Executable scripts
conf/ # Configuration files
lib/ # Library dependencies
plugins/ # Plugin modules
Ensure you have the prerequisites installed:
Clone the repository and build:
bash
git clone https://github.com/aliyun/aliyun-odps-console.git
cd aliyun-odps-console
mvn clean package -DskipTests
The built package will be available at:
odps-console-dist-public/target/odpscmd_public.zip
Before using the ODPS Console, you need to configure it with your MaxCompute credentials and settings.
conf/odps_config.ini:
```ini
# Basic configuration (required)
project_name = your_project_name
access_id = your_access_id
access_key = your_access_key
end_point = your_endpoint# Optional configurations for enhanced functionality log_view_host = https://logview.odps.aliyun.com debug = false instance_priority = 9 ```
You can obtain your endpoint from the MaxCompute endpoints documentation.
For detailed configuration options, see the Configuration section below.
Run the console in interactive mode:
bash
./bin/odpscmd
You should see a prompt like: ``` ODPS Console Aliyun ODPS Command Line Tool Version 0.52.3-public
odps@your_project_name> ```
Execute a simple command to verify your setup:
sql
odps@your_project_name> show tables;
For batch execution, you can run commands directly: ```bash # Execute a single SQL command ./bin/odpscmd -e "show tables;"
# Execute a SQL script file ./bin/odpscmd -f /path/to/script.sql ```
List tables in your project:
sql
show tables;
Describe a table structure:
sql
desc table_name;
Run a simple query:
sql
select * from table_name limit 10;
Upload data to a table:
sql
tunnel upload /path/to/local/file.txt table_name;
Download data from a table:
sql
tunnel download table_name /path/to/local/file.txt;
The ODPS Console supports several command-line options:
-e "command" - Execute a single command and exit-f script.sql - Execute commands from a script file--config file - Specify a custom configuration file-h, --help - Display help information-v, --version - Display version informationExample:
./bin/odpscmd -e "select count(*) from my_table;" --config /path/to/custom_config.ini
The ODPS Console requires configuration to connect to your MaxCompute project. The configuration is
specified in an odps_config.ini file with the following parameters:
| Parameter | Description | Required | Default Value |
|---|---|---|---|
project_name |
The name of your MaxCompute project | Yes | None |
access_id |
Your Alibaba Cloud Access Key ID | Yes | None |
access_key |
Your Alibaba Cloud Access Key Secret | Yes | None |
end_point |
The API endpoint for MaxCompute service | Yes | None |
schema_name |
The schema name in MaxCompute | No | None |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
proxy_host |
Proxy server hostname | No | None |
proxy_port |
Proxy server port | No | None |
https_check |
Enable SSL certificate verification | No | true |
network_read_timeout |
Network read timeout in milliseconds | No | None |
network_connect_timeout |
Network connection timeout in milliseconds | No | None |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
log_view_host |
The host for LogView (job execution logs) | No | https://logview.odps.aliyun.com |
log_view_version |
LogView version | No | None |
log_view_life |
LogView life time in hours | No | 720 (30 days) |
debug |
Enable debug mode for detailed logging | No | false |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
account_provider |
Authentication method (aliyun, sts, etc.) | No | aliyun |
sts_token |
Security Token Service token for temporary credentials | No | None |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
instance_priority |
Priority for job execution (0-9, where 0 is highest) | No | 9 |
use_instance_tunnel |
Use instance tunnel for SQL result download | No | false |
instance_tunnel_max_record |
Maximum records to download via instance tunnel | No | None |
instance_tunnel_max_size |
Maximum size to download via instance tunnel (bytes) | No | None |
running_cluster |
Specify the cluster to run jobs | No | None |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
enable_interactive_mode |
Enable interactive query mode | No | false |
interactive_service_name |
Name of the interactive service | No | public.default |
interactive_output_compatible |
Enable compatible output mode for interactive queries | No | false |
interactive_auto_rerun |
Automatically rerun failed interactive queries | No | false |
interactive_max_attach |
Maximum number of sessions to attach | No | None |
attach_session_timeout |
Timeout for attaching sessions (seconds) | No | 60 |
keep_session_variables |
Keep session variables when switching projects | No | false |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
tunnel_endpoint |
Custom endpoint for tunnel service | No | None |
hub_endpoint |
Custom endpoint for DataHub service | No | None |
data_size_confirm |
Confirmation threshold for data size (GB) | No | None |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
lite_mode |
Enable lite mode for faster execution | No | false |
enable_quota_cache |
Enable quota information caching | No | false |
skip_progress |
Skip progress reporting for better performance | No | false |
| Parameter | Description | Required | Default Value |
|---|---|---|---|
update_url |
Custom URL for update checks | No | None |
post_hook_class |
Custom post-hook class for extensions | No | None |
user_commands |
Custom user commands configuration | No | None |
| Parameter | Description | Required | Default Value | |---
$ claude mcp add aliyun-odps-console \
-- python -m otcore.mcp_server <graph>