盐城市城乡建设局网站,网页版哔哩哔哩,公司做网站报价,面试网站建设工程师摘要#xff1a; MaxCompute Console 可以从 这里 下载。在阿里云官网可以查看 帮助文档。 这里跟大家分享一些 MaxCompute Console 中实用的小命令。
MaxCompute Console 可以从 这里 下载。在阿里云官网可以查看 帮助文档。
这里跟大家分享一些 MaxCompute Console 中实用的…摘要 MaxCompute Console 可以从 这里 下载。在阿里云官网可以查看 帮助文档。 这里跟大家分享一些 MaxCompute Console 中实用的小命令。
MaxCompute Console 可以从 这里 下载。在阿里云官网可以查看 帮助文档。
这里跟大家分享一些 MaxCompute Console 中实用的小命令。嗯一般人我不告诉他
1 odpscmd -v 查看 odpscmd 版本/Users/zhenhong/tool/odps_clt ./bin/odpscmd -v
******Odps Command Line Tools******
BuildTime: 2016-06-27 18:14:48
Revision: 30d623d
MavenVersion: 0.24.0-snapshot
Branch: develop
2 开启 debug 模式
在 odps_config.ini 中加一行debugtrue将开启调试模式。之后在 odpscmd 运行过程中会输出 debug 日志、异常 stacktrace 等方便定位问题。/Users/zhenhong/tool/odps_clt cat conf/odps_config.ini
debugtrue
access_id***
access_key***
end_point***
project_name***
运行 odpscmd输入错误命令将会看到错误日志/Users/zhenhong/tool/odps_clt ./bin/odpscmd
[DEBUG]:ODPSConsole Start
Aliyun ODPS Command Line Tool
Version 0.24.0-snapshot
Copyright 2015 Alibaba Cloud Computing Co., Ltd. All rights reserved.
odps odps_test_tunnel_project_gcc492ll tables;
FAILED: ODPS-0130161:Parse exception - line 1:0 cannot recognize input near ll tables EOF
[DEBUG]: com.aliyun.openservices.odps.console.ODPSConsoleException: ODPS-0130161:Parse exception - line 1:0 cannot recognize input near ll tables EOFat com.aliyun.openservices.odps.console.QueryCommand.run(QueryCommand.java:212)
。。。
3 help 命令关键字 获取命令使用提示
大多数同学都知道使用 odpscmd -h 或者 help;来获取 odpscmd 的所有命令提示。 除了这个我们还有专门的 help 关键字 命令呢。例如使用help ls; 获取与 ls 相关的命令使用 help table; 命令来获取所有与 table 相关的命令提示。/Users/zhenhong/tool/odps_clt ./bin/odpscmd
[DEBUG]:ODPSConsole Start
Aliyun ODPS Command Line Tool
Version 0.24.0-snapshot
Copyright 2015 Alibaba Cloud Computing Co., Ltd. All rights reserved.
odps odps_test_tunnel_project_gcc492help table;Usage: show tables [in projectname]list|ls tables [-p,-project projectname]
Usage: export table tablename
Usage: alter table tablename merge smallfiles
Usage: read table_name [(col_name[,..])][PARTITION (partition_spec)][line_num]
是不是很方便呢再也不用去翻文档了
另外负责数据上传下载 tunnel 命令除了有 help tunnel; 来获取提示还有tunnel help 来获取详细命令提示下面例子使用 tunnel help download 得到与下载相关的命令参数。
odps odps_test_tunnel_project_gcc492tunnel help download;
usage: tunnel download [options] [project.]table[/partition] pathdownload data to local file-c,-charset ARG specify file charset, default ignore.set ignore to download raw data
。。。。此处省略大量参数提示-tz,-time-zone ARG time zone, default local timezone:Asia/Shanghai
Example:tunnel download test_project.test_table/p1b1,p2b2 log.txt
4 wait 获取 instance 详细信息logview、 summary 等 当一个作业已经运行完成或者被放到后台执行我们就不能再看到 instance 相关的执行信息包括 logview 链接、instance summary、instance 运行的结果等等。这个时候使用 wait 命令可以再次获取到这些信息。
odps odps_testwait 20161008231329221gr58pvyi2;ID 20161008231329221gr58pvyi2
Log view:
http://logview.odps.aliyun-inc.com:8080/logview/?hhttp://***:***/***podps_testi20161008231329221gr58pvyi2token********
Summary:
resource cost: cpu 0.00 Core * Min, memory 0.00 GB * Min
inputs:odps_test.src: 500 (2608 bytes)
outputs:
[此处省略。。。]_c0
500
5 命令自动补全
由于历史原因odpscmd 的命令没有统一的规范完整的命令补全不是很好做但是在 0.23.0 版本之后我们做了命令关键字和文件路径的自动补全使用TAB键即可。 下面列出输入不同字符后敲 TAB 键的结果
odps test_new_console_gcctunnel up
update updateabtest upload
odps test_new_console_gcctunnel upload test_dual ./te
test test_body test_dual test_dual1 test_header test_out test_value text
odps test_new_console_gccadd resource /tmp/
com.apple.launchd.1YmqQ8L2kK com.apple.launchd.26PWVPElv8 entsafemgr.log
6 history 命令查看历史
用来找曾经写过的命令特别方便哦。
odps test_new_console_gcchistory;
1 count src;
2 select t1.prediction_result from pai_pred_output_perd_14561096286930 t1 join pai_pred_output_perd_14561096286930 t2 on t1.label t2.label;
3 desc instance 20160811091342933gtvve03
4 desc instance 20160811091342933gtvve03;
5 wait 20160811091342933gtvve03;
省略 。。。
注 最多缓存 500 条历史命令
7 版本更新自动提示
在最新的开发版本中我们添加了版本的更新提示功能先露个脸吧/Users/zhenhong/tool/odps_clt ./bin/odpscmd
Aliyun ODPS Command Line Tool
Version 0.25.0-snapshot
Copyright 2015 Alibaba Cloud Computing Co., Ltd. All rights reserved.
New version 0.25.1 available! Try it now! http://repo.aliyun.com/odpscmd/
持续更新中 (欢迎补充更欢迎吐槽(_))。。。
如果上述命令的您还不能使用请先升级版本哦快来 试试 吧
原文链接
干货好文请关注扫描以下二维码