mirror of
https://github.com/tldr-pages/tldr.git
synced 2024-11-01 03:38:05 +01:00
odps: add page
Change-Id: If1efc9f677f3e480131a293f6c6bb43aaea40a6b
This commit is contained in:
parent
653f2eb376
commit
4c21b73d81
1 changed files with 39 additions and 0 deletions
39
pages/common/odps.md
Normal file
39
pages/common/odps.md
Normal file
|
@ -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}};`
|
Loading…
Reference in a new issue