odps-sdk/odps-lot-proto/common/ddl.proto (82 lines of code) (raw):
import "common/expression.proto";
import "common/types.proto";
import "common/partitionspec.proto";
package apsara.odps;
option java_outer_classname = "DDLProtos";
message ColumnDescription
{
required string Name = 1;
required Type Type = 2;
required int32 Index = 3;
optional string Comment = 4;
}
//create table xx (a int....
message CreateTable
{
required string Project = 1;
required string Table = 2;
repeated ColumnDescription Columns = 3;
repeated ColumnDescription PartitionColumns = 4;
optional string Comment = 5;
optional bool IfNotExists = 6 [default = false];
optional int32 LifeCycle = 7;
}
message CreateStreamTable
{
required string Project = 1;
required string Table = 2;
repeated ColumnDescription Columns = 3;
required string Uri = 4;
optional string Comment = 5;
}
message CreateDimensionTable
{
required string Project = 1;
required string Table = 2;
repeated ColumnDescription Columns = 3;
required string Uri = 4;
optional string Comment = 5;
}
message CreateResultTable
{
required string Project = 1;
required string Table = 2;
repeated ColumnDescription Columns = 3;
required string Uri = 4;
optional string Comment = 5;
repeated string PrimaryKeys = 6;
}
message CreateTempTable
{
required string Table = 1;
repeated ColumnDescription Columns = 2;
}
message CreateTableLike
{
required string Project = 1;
required string Table = 2;
required string SourceProject = 3;
required string SourceTable = 4;
optional bool IfNotExists = 5 [default = false];
}
message DropTable
{
required string Project = 1;
required string TableName = 2;
optional bool IfExists = 3 [default = false];
}
message AlterTable
{
required string Project = 1;
required string TableName = 2;
optional group AddPartition = 3
{
required PartitionSpec PartSpec = 1;
optional bool IfNotExists = 2 [default = false];
}
optional group DropPartition = 4
{
required PartitionSpec PartSpec = 1;
optional bool IfNotExists = 2 [default = false];
}
}