Open user-GitHub-user opened 1 year ago
2.0.2
when create table by BUCKETS AUTO, An export with partitions exports all of the table's data
An export with partitions exports only the data in the specified partition
CREATE TABLEkec( timestampdatetime NULL COMMENT "时间" ) ENGINE=OLAP DUPLICATE KEY(timestamp) COMMENT "" PARTITION BY RANGE(timestamp)() DISTRIBUTED BY RANDOM BUCKETS AUTO PROPERTIES ( "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "HOUR", "dynamic_partition.end" = "24", "dynamic_partition.prefix" = "p", "replication_num" = "2" )
CREATE TABLE
(
datetime NULL COMMENT "时间" ) ENGINE=OLAP DUPLICATE KEY(
) COMMENT "" PARTITION BY RANGE(timestamp)() DISTRIBUTED BY RANDOM BUCKETS AUTO PROPERTIES ( "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "HOUR", "dynamic_partition.end" = "24", "dynamic_partition.prefix" = "p", "replication_num" = "2" )
You need to change the time and partition key: insert into kec values("2023-11-17 16:01:01"); insert into kec values("2023-11-17 17:01:01");
insert into kec values("2023-11-17 16:01:01"); insert into kec values("2023-11-17 17:01:01");
EXPORT TABLE kec PARTITION(p2023111717) TO "file:///tmp/" PROPERTIES ( "label" = "kec_p2023111717" );
SHOW EXPORT WHERE LABEL = "kec_p2023111717" ORDER BY StartTime DESC;
No response
cannot reproduce in lastest 2.0 and master
Search before asking
Version
2.0.2
What's Wrong?
when create table by BUCKETS AUTO, An export with partitions exports all of the table's data
What You Expected?
An export with partitions exports only the data in the specified partition
How to Reproduce?
CREATE TABLE
kec(
timestampdatetime NULL COMMENT "时间" ) ENGINE=OLAP DUPLICATE KEY(
timestamp) COMMENT "" PARTITION BY RANGE(timestamp)() DISTRIBUTED BY RANDOM BUCKETS AUTO PROPERTIES ( "dynamic_partition.enable" = "true", "dynamic_partition.time_unit" = "HOUR", "dynamic_partition.end" = "24", "dynamic_partition.prefix" = "p", "replication_num" = "2" )
You need to change the time and partition key:
insert into kec values("2023-11-17 16:01:01"); insert into kec values("2023-11-17 17:01:01");
EXPORT TABLE kec PARTITION(p2023111717) TO "file:///tmp/" PROPERTIES ( "label" = "kec_p2023111717" );
SHOW EXPORT WHERE LABEL = "kec_p2023111717" ORDER BY StartTime DESC;
Anything Else?
No response
Are you willing to submit PR?
Code of Conduct