1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 12:24:55 +02:00
tldr/pages/common/odps-table.md
程亦超(何兮) dc961a6400 odps-table: rename ddl to table
Change-Id: I85f19f6fdb1df566a500a4353345b2e4b10b2f48
2016-05-12 20:35:27 +08:00

23 lines
590 B
Markdown

# 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}};`