mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 00:44:54 +02:00
commit
b32d8ed4a0
1 changed files with 23 additions and 0 deletions
23
pages/common/odps-table.md
Normal file
23
pages/common/odps-table.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# odps table
|
||||
|
||||
> Create and modify tables in ODPS (Open Data Processing Service).
|
||||
|
||||
- Create a table with partition and lifecycle:
|
||||
|
||||
`create table {{table_name}} ({{col}} {{type}}) partitioned by ({{col}} {{type}}) lifecycle {{days}};`
|
||||
|
||||
- Create a table based on the definition of another table:
|
||||
|
||||
`create table {{table_name}} like {{another_table}};`
|
||||
|
||||
- Add partition to a table:
|
||||
|
||||
`alter table {{table_name}} add parition ({{partition_spec}});`
|
||||
|
||||
- Delete partition from a table:
|
||||
|
||||
`alter table {{table_name}} drop partition ({{partition_spec}});`
|
||||
|
||||
- Delete table:
|
||||
|
||||
`drop table {{table_name}};`
|
Loading…
Add table
Reference in a new issue