odps-table

odps-table

TLDR

Create a table with partition and lifecycle

$ create table [table_name] ([col] [type]) partitioned by ([col] [type]) lifecycle [days];
copy

Create a table based on the definition of another table

$ create table [table_name] like [another_table];
copy

Add partition to a table

$ alter table [table_name] add partition ([partition_spec]);
copy

Delete partition from a table

$ alter table [table_name] drop partition ([partition_spec]);
copy

Delete table

$ drop table [table_name];
copy

Copied to clipboard
gala