This topic describes the commonly used commands and whether these commands are free of charge.

Command Description Charged? Example
TUNNEL DOWNLOAD Download data over the classic network. No TUNNEL DOWNLOAD table_name e:/table_name.txt;

Configure the endpoint of MaxCompute in the classic network: http://dt.cn-shanghai.maxcompute.aliyun-inc.com.

For more information, see Configure endpoints.

TUNNEL DOWNLOAD Download data over the Internet. Yes TUNNEL DOWNLOAD table_name e:/table_name.txt;

Configure the public endpoint of MaxCompute: http://dt.cn-shanghai.maxcompute.aliyun.com.

For more information, see Configure endpoints.

TUNNEL UPLOAD Upload data. No TUNNEL UPLOAD e:/table_name.txt table_name;
COST SQL Estimate costs. No COST SQL SELECT * FROM table_name;
INSERT OVERWRITE...SELECT Update data. Yes INSERT OVERWRITE TABLE table_name PARTITION (sale_date='20180122') SELECT shop_name, customer_id, total_price FROM sale_detail;
DESC TABLE Query table information. No DESC table_name;
DROP TABLE Delete a table. No DROP TABLE if exists table_name;
CREATE TABLE Create a table. No CREATE TABLE if not exists table_name (key string ,value bigint) PARTITIONED BY(p string);
CREATE TABLE...SELECT Create a table. Yes CREATE TABLE if not exists table_name AS SELECT * FROM a_tab;
INSERT INTO TABLE...VALUES Quickly insert constant data. No INSERT INTO TABLE table_name partition (p)(key,p) VALUES ('d','20170101'),('e','20170101'),('f','20170101');
INSERT INTO TABLE...SELECT Insert data. Yes INSERT INTO TABLE table_name SELECT shop_name, customer_id, total_price FROM sale_detail;
SELECT UDF [NOT COUNT or All] FROM TABLE Query table data. Yes SELECT sum(a) FROM table_name;
SET FLAG Configure session settings. No SET odps.sql.allow.fullscan=true;
JAR MR Execute a MapReduce job. Yes JAR -l com.aliyun.odps.mapred.example.WordCount wc_in wc_out
ADD JAR/FILE/ARCHIVE/TABLE Add a resource. No ADD jar data\resources\mapreduce-examples.jar -f;
DROP JAR/FILE/ARCHIVE/TABLE Remove a resource. No DROP RESOURCE sale.res
LIST RESOURCES Query resources. No LIST RESOURCES;
GET RESOURCES Download resources. No GET RESOURCES odps-udf-examples.jar d:\;
CREATE FUNCTIONS Create a function. No CREATE FUNCTION test_lower ;
DROP FUNCTIONS Delete a function. No DROP FUNCTION test_lower;
LIST FUNCTIONS Query functions. No LIST FUNCTIONS;
ALTER TABLE...DROP PARTITION Delete a partition from a table. No ALTER TABLE user DROP if exists partition(region='hangzhou',dt='20150923');
TRUNCATE TABLE Remove all records from a non-partitioned table. No TRUNCATE TABLE table_name;
CREATE EXTERNAL TABLE Create an external table. No CREATE EXTERNAL TABLE IF NOT EXISTS ambulance_data_csv_external…LOCATION 'oss://oss-cn-shanghai-internal.aliyuncs.com/oss-odps-test/Demo/'
SELECT [EXTERNAL] TABLE Read an external table. Yes SELECT recordId, patientId, direction FROM ambulance_data_csv_external WHERE patientId > 25;
SHOW TBALES Query all tables in the current project. No SHOW TABLES;
SHOW PARTITIONS table_name Query all partitions of a table. No SHOW PARTITIONS <table_name>
SHOW INSTANCE/SHOW P Show information about the instance that the current user creates. No SHOW INSTANCES/SHOW P
WAIT INSTANCE Return the Logview URL of the specified instance. No WAIT 20131225123302267gk3u6k4y2
STATUS INSTANCE Return the status of the specified instance. No STATUS 20131225123302267gk3u6k4y2
KILL INSTANCE Stop the specified instance. No KILL 20131225123302267gk3u6k4y2