2016-05-11 13:39:56 +01:00
|
|
|
# odps
|
|
|
|
|
2016-05-11 17:13:29 +01:00
|
|
|
> Aliyun ODPS (Open Data Processing Service) command line tool.
|
2016-05-11 13:39:56 +01:00
|
|
|
|
2016-05-11 17:13:29 +01:00
|
|
|
- Start the command line with a custom configuration file:
|
2016-05-11 13:39:56 +01:00
|
|
|
|
|
|
|
`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}};`
|
|
|
|
|
2016-05-11 17:13:29 +01:00
|
|
|
- Describe table partition:
|
2016-05-11 13:39:56 +01:00
|
|
|
|
|
|
|
`desc {{table_name}} partition ({{partition_spec}});`
|
|
|
|
|
|
|
|
- Create a partitiond table with lifecycle:
|
|
|
|
|
|
|
|
`create table {{name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};`
|