/Users/zhenhong/tool/odps_clt ./bin/odpscmd[DEBUG]:ODPSConsole StartAliyun ODPS Command Line ToolVersion 0.24.0-snapshot@copyright 2015 Alibaba Cloud Computing Co., Ltd. All rights reserved.odps@ odps_test_tunnel_project_gcc492>ll tables;FAILED: ODPS-0130161:Parse exception - line 1:0 cannot recognize input near 'll' 'tables' ''[DEBUG]: com.aliyun.openservices.odps.console.ODPSConsoleException: ODPS-0130161:Parse exception - line 1:0 cannot recognize input near 'll' 'tables' '' at 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 StartAliyun ODPS Command Line ToolVersion 0.24.0-snapshot@Copyright 2015 Alibaba Cloud Computing Co., Ltd. All rights reserved.odps@ odps_test_tunnel_project_gcc492>help table;Usage: show tables [in ] list|ls tables [-p,-project ]Usage: export table Usage: alter table merge smallfilesUsage: read [<(col_name>[,..])][PARTITION <(partition_spec)>][line_num]
是不是很方便呢?再也不用去翻文档了!
另外,负责数据上传下载 tunnel 命令,除了有 help tunnel; 来获取提示,还有tunnel help 来获取详细命令提示,下面例子使用 tunnel help download; 得到与下载相关的命令参数。
odps@ odps_test_tunnel_project_gcc492>tunnel help download;usage: tunnel download [options] <[project.]table[/partition]> download data to local file -c,-charset specify file charset, default ignore. set ignore to download raw data。。。。(此处省略大量参数提示) -tz,-time-zone time zone, default local timezone: Asia/ShanghaiExample: tunnel download test_project.test_table/p1="b1",p2="b2" log.txt
/Users/zhenhong/tool/odps_clt ./bin/odpscmdAliyun ODPS Command Line ToolVersion 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/