CREATE TABLE [ IF NOT EXISTS ] table_identifier( col_name[:] col_type [ COMMENT col_comment ], ... )[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ]
CREATE TABLE dempts(id bigint COMMENT 'id number',num int,eno float,dno double,cno decimal(9,3),flag boolean,data string,ts_year timestamp,date_month date,bno binary,point struct<x: double, y: double>,points array<struct<x: double, y: double>>,pointmaps map<struct<x: int>, struct<a: int>>)COMMENT 'table documentation'PARTITIONED BY (bucket(16,id), years(ts_year), months(date_month), identity(bno), bucket(3,num), truncate(10,data));
CREATE TABLE [ IF NOT EXISTS ] table_identifier( col_name[:] col_type [ COMMENT col_comment ], ... )USING iceberg[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ][ LOCATION path ][ TBLPROPERTIES ( property_name=property_value, ... ) ]
CREATE TABLE dempts(id bigint COMMENT 'id number',num int,eno float,dno double,cno decimal(9,3),flag boolean,data string,ts_year timestamp,date_month date,bno binary,point struct<x: double, y: double>,points array<struct<x: double, y: double>>,pointmaps map<struct<x: int>, struct<a: int>>)USING icebergCOMMENT 'table documentation'PARTITIONED BY (bucket(16,id), years(ts_year), months(date_month), identity(bno), bucket(3,num), truncate(10,data))LOCATION 'cosn://rickytest-1305424723/channing-test/loc'TBLPROPERTIES ('write.format.default'='orc');
CREATE TABLE [ IF NOT EXISTS ] table_identifier[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ]AS select_statement
CREATE TABLE IF NOT EXISTS dempts_copyCOMMENT 'table create as select'PARTITIONED BY (eno, dno)AS SELECT * from dempts;
CREATE TABLE [ IF NOT EXISTS ] table_identifierUSING iceberg[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ][ LOCATION path ][ TBLPROPERTIES ( property_name=property_value, ... ) ]AS select_statement
CREATE TABLE dempts_copyUSING icebergCOMMENT 'table create as select'PARTITIONED BY (eno, dno)LOCATION 'cosn://rickytest-1305424723/channing-test/loc'TBLPROPERTIES ('write.format.default'='avro')AS SELECT * from dempts;
CREATE OR REPLACE TABLE table_identifier[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ]AS select_statement
CREATE OR REPLACE TABLE dempts_replaceCOMMENT 'table create as replace'PARTITIONED BY (eno, bucket(10, num))AS SELECT * from dempts;
CREATE [OR REPLACE] TABLE table_identifierUSING iceberg[ COMMENT table_comment ][ PARTITIONED BY ( col_name1, transform(col_name2), ... ) ][ LOCATION path ][ TBLPROPERTIES ( property_name=property_value, ... ) ]AS select_statement
CREATE OR REPLACE TABLE dempts_replaceUSING icebergCOMMENT 'table create as replace'PARTITIONED BY (eno, dno)LOCATION 'cosn://rickytest-1305424723/channing-test/loc'TBLPROPERTIES ('write.format.default'='avro')AS SELECT * from dempts;
CALL `Catalog`.`system`.snapshot(source_table, table, [location], [properties]);
CALL `DataLakeCatalog`.`system`.snapshot('validation.table_01', 'validation.snap');CALL `DataLakeCatalog`.`system`.snapshot('validation.table_01', 'validation.snap2', 'cosn://channingdata-1305424723/example3/');
CALL `Catalog`.`system`.migrate(table, [properties]);
CALL `DataLakeCatalog`.`system`.migrate('validation.table_01');CALL `DataLakeCatalog`.`system`.migrate('validation.table_01', map('data', 'name'));
CALL `Catalog`.`system`.add_files(table, source_table, [partition_filter]);
CALL `DataLakeCatalog`.`system`.add_files(`table`=>'validation.table_02', `source_table`=>'validation.table_01');CALL `DataLakeCatalog`.`system`.add_files(`table`=>'validation.table_02', `source_table`=>'validation.table_01', `partition_filter`=>map('part_col', 'A'));
本页内容是否解决了您的问题?