计费命令参考

更新时间:
复制 MD 格式

本文列举部分常用命令的计费状态。

下表供您了解执行相关命令是否产生计费。

说明
  • 下表未涵盖全部命令,持续更新中。

  • 下表不能作为实际收费标准,仅供参考,实际费用请以账单为准。

语法表达式

用途

是否收费

样例

TUNNEL DOWNLOAD

下载数据(云产品互联网络)

TUNNEL DOWNLOAD table_name e:/table_name.txt;

配置云产品互联网络Tunnel Endpoint,例如https://dt.cn-shanghai-intranet.maxcompute.aliyun-inc.com

Tunnel Endpoint的配置,请参见当从阿里云产品互联网络访问MaxCompute服务时(比如从Quick BI连接MaxCompute),请选择云产品互联Endpoint。 地域 所在城市(地域) 云产品互联Endpoint 云产品互联Tunnel Endpoint 中国 华东1(杭州) https://service.cn-hangzhou-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-hangzhou-intranet.maxcompute.aliyun-inc.com 中国 华东2(上海) https://service.cn-shanghai-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-shanghai-intranet.maxcompute.aliyun-inc.com 中国 华东1金融云(杭州) https://service.cn-hangzhou-finance-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-hangzhou-finance-intranet.maxcompute.aliyun-inc.com/api 中国 华东2金融云(上海) https://service.cn-shanghai-finance-1-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-shanghai-finance-1-intranet.maxcompute.aliyun-inc.com 中国 华北2(北京) https://service.cn-beijing-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-beijing-intranet.maxcompute.aliyun-inc.com 中国 华北2政务云(北京) https://service.cn-north-2-gov-1-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-north-2-gov-1-intranet.maxcompute.aliyun-inc.com 中国 华北3(张家口) https://service.cn-zhangjiakou-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-zhangjiakou-intranet.maxcompute.aliyun-inc.com 中国 华北6(乌兰察布) https://service.cn-wulanchabu-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-wulanchabu-intranet.maxcompute.aliyun-inc.com 中国 华南1(深圳) https://service.cn-shenzhen-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-shenzhen-intranet.maxcompute.aliyun-inc.com 中国 华南1金融云(深圳) https://service.cn-shenzhen-finance-1-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-shenzhen-finance-1-intranet.maxcompute.aliyun-inc.com 中国 西南1(成都) https://service.cn-chengdu-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-chengdu-intranet.maxcompute.aliyun-inc.com 中国 香港 https://service.cn-hongkong-intranet.maxcompute.aliyun-inc.com/api https://dt.cn-hongkong-intranet.maxcompute.aliyun-inc.com 亚太 新加坡 https://service.ap-southeast-1-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-southeast-1-intranet.maxcompute.aliyun-inc.com 亚太 马来西亚(吉隆坡) https://service.ap-southeast-3-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-southeast-3-intranet.maxcompute.aliyun-inc.com 亚太 印度尼西亚(雅加达) https://service.ap-southeast-5-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-southeast-5-intranet.maxcompute.aliyun-inc.com 亚太 泰国(曼谷) https://service.ap-southeast-7-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-southeast-7-intranet.maxcompute.aliyun-inc.com 亚太 日本(东京) https://service.ap-northeast-1-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-northeast-1-intranet.maxcompute.aliyun-inc.com 亚太 韩国(首尔) https://service.ap-northeast-2-intranet.maxcompute.aliyun-inc.com/api https://dt.ap-northeast-2-intranet.maxcompute.aliyun-inc.com 欧洲与美洲 德国(法兰克福) https://service.eu-central-1-intranet.maxcompute.aliyun-inc.com/api https://dt.eu-central-1-intranet.maxcompute.aliyun-inc.com 欧洲与美洲 美国(硅谷) https://service.us-west-1-intranet.maxcompute.aliyun-inc.com/api https://dt.us-west-1-intranet.maxcompute.aliyun-inc.com 欧洲与美洲 美国(弗吉尼亚) https://service.us-east-1-intranet.maxcompute.aliyun-inc.com/api https://dt.us-east-1-intranet.maxcompute.aliyun-inc.com 欧洲与美洲 英国(伦敦) https://service.eu-west-1-intranet.maxcompute.aliyun-inc.com/api https://dt.eu-west-1-intranet.maxcompute.aliyun-inc.com 欧洲与美洲 墨西哥 https://service.na-south-1-vpc.maxcompute.aliyun-inc.com/api https://dt.na-south-1-intranet.maxcompute.aliyun-inc.com 中东与印度 阿联酋(迪拜) https://service.me-east-1-intranet.maxcompute.aliyun-inc.com/api https://dt.me-east-1-intranet.maxcompute.aliyun-inc.com

TUNNEL DOWNLOAD

下载数据(公网)

收费

TUNNEL DOWNLOAD table_name e:/table_name.txt;

需配置公网Tunnel Endpoint,例如http://dt.cn-shanghai.maxcompute.aliyun.com

Tunnel Endpoint的配置,请参见公网 Endpoint

TUNNEL UPLOAD

上传数据(公共数据传输服务资源组)

TUNNEL UPLOAD e:/table_name.txt table_name;

COST SQL

费用预估

COST SQL SELECT * FROM table_name;

INSERT OVERWRITE…SELECT

数据更新

收费

INSERT OVERWRITE TABLE table_name PARTITION (sale_date='20180122') 
  SELECT shop_name, customer_id, total_price 
  FROM sale_detail;

DESC TABLE

查看表信息

DESC table_name;

DROP TABLE

删除表及表数据

DROP TABLE if exists table_name;

CREATE TABLE

创建表

CREATE TABLE if not exists table_name (
  key string 
  ,value bigint
) PARTITIONED BY(p string);

CREATE TABLE…SELECT

创建表

收费

CREATE TABLE if not exists table_name AS 
  SELECT * FROM a_tab;

INSERT INTO TABLE…VALUES

快速插入常量数据

收费

INSERT INTO TABLE table_name partition (p)(key,p) VALUES ('d','20170101'),('e','20170101'),('f','20170101');

INSERT INTO TABLE...SELECT

插入数据

收费

INSERT INTO TABLE table_name 
  SELECT shop_name, customer_id, total_price 
  FROM sale_detail;

SELECT UDF [NOT COUNT or All] FROM TABLE

查询表数据

收费

SELECT sum(a) FROM table_name;

SET FLAG

会话设置

SET odps.sql.allow.fullscan=true;

JAR MR

运行MapReduce作业

收费

JAR -l com.aliyun.odps.mapred.example.WordCount wc_in wc_out

ADD JAR/FILE/ARCHIVE/TABLE

注册资源

ADD jar data\resources\mapreduce-examples.jar -f;

DROP RESOURCE

删除资源

DROP RESOURCE sale.res

GET RESOURCE

下载资源

GET RESOURCES odps-udf-examples.jar d:\;

LIST RESOURCES

查看资源列表

LIST RESOURCES;

CREATE FUNCTION

注册函数

CREATE FUNCTION test_lower;

DROP FUNCTION

删除函数

DROP FUNCTION test_lower;

LIST FUNCTIONS

查看函数列表

LIST FUNCTIONS;

ALTER TABLE…DROP PARTITION

删除表分区

ALTER TABLE user DROP if exists partition(region='hangzhou',dt='20150923');

TRUNCATE TABLE

清除非分区表中的数据

TRUNCATE TABLE table_name;

CREATE EXTERNAL TABLE

创建外表

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

读取外表

收费

SELECT recordId, patientId, direction
FROM ambulance_data_csv_external
WHERE patientId > 25;

SHOW TBALES

列出当前项目空间下所有的表

SHOW TABLES;

SHOW PARTITIONS

列出一张表中的所有分区

SHOW PARTITIONS table_name;

SHOW INSTANCE/SHOW P

返回由当前用户创建的实例信息

SHOW INSTANCES/SHOW P;

WAIT INSTANCE

返回指定实例Logview

WAIT 20131225123302267gk3u6k4y2;

STATUS INSTANCE

返回指定实例的状态

STATUS 20131225123302267gk3u6k4y2;

KILL INSTANCE

停止您指定的实例

KILL 20131225123302267gk3u6k4y2;