mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-03 06:55:05 +00:00
Update cheatsheets
This commit is contained in:
30
odps-table
Normal file
30
odps-table
Normal file
@@ -0,0 +1,30 @@
|
||||
---
|
||||
syntax: markdown
|
||||
tags: [tldr, common]
|
||||
source: https://github.com/tldr-pages/tldr.git
|
||||
---
|
||||
# odps table
|
||||
|
||||
> Create and modify tables in ODPS (Open Data Processing Service).
|
||||
> See also `odps`.
|
||||
> More information: <https://www.alibabacloud.com/help/doc-detail/27971.htm>.
|
||||
|
||||
- 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 partition ({{partition_spec}});`
|
||||
|
||||
- Delete partition from a table:
|
||||
|
||||
`alter table {{table_name}} drop partition ({{partition_spec}});`
|
||||
|
||||
- Delete table:
|
||||
|
||||
`drop table {{table_name}};`
|
||||
Reference in New Issue
Block a user