From 4c21b73d817622b28403bc97ee92883bb2a2fce6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E4=BA=A6=E8=B6=85=28=E4=BD=95=E5=85=AE=29?= Date: Wed, 11 May 2016 20:39:56 +0800 Subject: [PATCH 1/3] odps: add page Change-Id: If1efc9f677f3e480131a293f6c6bb43aaea40a6b --- pages/common/odps.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 pages/common/odps.md diff --git a/pages/common/odps.md b/pages/common/odps.md new file mode 100644 index 0000000000..5487db7a55 --- /dev/null +++ b/pages/common/odps.md @@ -0,0 +1,39 @@ +# odps + +> Aliyun ODPS command line tool. + +- Start the command line: + +`odpscmd --config {{odps_config.ini}}` + +- Switch current project: + +`use {{project_name}};` + +- Show tables in the current project: + +`show tables;` + +- Show table partitions: + +`show partitions {{table_name}};` + +- Describe table/partition: + +`desc {{table_name}} partition ({{partition_spec}});` + +- Create a partitiond table with lifecycle: + +`create table {{name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};` + +- Read the content of table: + +`read {{table_name}} partition ({{partition_spec}}) {{limit}};` + +- Download the table: + +`tunnel download {{table_name}}/{{partition_spec}} {{file}};` + +- Upload the table: + +`tunnel upload {{file}} {{table_name}}/{{partition_spec}};` From 8cd264e4f240e70184ae09ab9fc67ec7b7680c68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E4=BA=A6=E8=B6=85=28=E4=BD=95=E5=85=AE=29?= Date: Thu, 12 May 2016 00:13:29 +0800 Subject: [PATCH 2/3] odps: reduce num of showcases Change-Id: I677a417cf14170ed9f33781d376e004a6c5ca133 --- pages/common/odps.md | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/pages/common/odps.md b/pages/common/odps.md index 5487db7a55..dbbc842bdc 100644 --- a/pages/common/odps.md +++ b/pages/common/odps.md @@ -1,8 +1,8 @@ # odps -> Aliyun ODPS command line tool. +> Aliyun ODPS (Open Data Processing Service) command line tool. -- Start the command line: +- Start the command line with a custom configuration file: `odpscmd --config {{odps_config.ini}}` @@ -18,22 +18,10 @@ `show partitions {{table_name}};` -- Describe table/partition: +- Describe table partition: `desc {{table_name}} partition ({{partition_spec}});` - Create a partitiond table with lifecycle: `create table {{name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};` - -- Read the content of table: - -`read {{table_name}} partition ({{partition_spec}}) {{limit}};` - -- Download the table: - -`tunnel download {{table_name}}/{{partition_spec}} {{file}};` - -- Upload the table: - -`tunnel upload {{file}} {{table_name}}/{{partition_spec}};` From 3132be399a6bcaf7010996a0038b1a39bd4b40e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A8=8B=E4=BA=A6=E8=B6=85=28=E4=BD=95=E5=85=AE=29?= Date: Thu, 12 May 2016 00:17:52 +0800 Subject: [PATCH 3/3] odps: delete one case and add one case Change-Id: I3b6fb2d300a2d27e44110566654fed722fb92441 --- pages/common/odps.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pages/common/odps.md b/pages/common/odps.md index dbbc842bdc..f1a994da7b 100644 --- a/pages/common/odps.md +++ b/pages/common/odps.md @@ -14,14 +14,14 @@ `show tables;` +- Describe a table: + +`desc {{table_name}};` + - Show table partitions: `show partitions {{table_name}};` -- Describe table partition: +- Describe a partition: `desc {{table_name}} partition ({{partition_spec}});` - -- Create a partitiond table with lifecycle: - -`create table {{name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};`