1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-28 23:04:54 +02:00

odps-ddl: add page

Change-Id: I75366bdb9f6c96136c4838c6961159418a77dae7
This commit is contained in:
程亦超(何兮) 2016-05-12 13:28:55 +08:00
parent 3132be399a
commit bad358af7a

23
pages/common/odps-sql.md Normal file
View file

@ -0,0 +1,23 @@
# odps ddl
> Run ddl task in odps.
- 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 parition 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}};`