CREATE TABLE
`K_DAY_AVE_BAL1` (
`aff_arg_no` CHAR(55) NOT NULL,
`arg_no` CHAR(55) NOT NULL,
`org_no` CHAR(50) NOT NULL,
`stt_dat` DATE NOT NULL,
`acct_no` CHAR(10) NULL,
`end_dat` DATE NULL,
`bal` DECIMAL(22, 2) NULL,
`las_bal` DECIMAL(22, 2) NULL
) ENGINE = OLAP UNIQUE KEY(`aff_arg_no`, `arg_no`, `org_no`, `stt_dat`) COMMENT 'OLAP' AUTO PARTITION BY LIST (stt_dat) (
PARTITION p20232d122d3110
VALUES
IN ('2023-12-31'),
PARTITION p20242d012d0110
VALUES
IN ('2024-01-01'),
PARTITION p20242d012d0210
VALUES
IN ('2024-01-02'),
PARTITION p20242d012d0310
VALUES
IN ('2024-01-03'),
PARTITION p20242d012d0410
VALUES
IN ('2024-01-04'),
PARTITION p20242d012d0510
VALUES
IN ('2024-01-05'),
PARTITION p20242d012d0610
VALUES
IN ('2024-01-06'),
PARTITION p20242d012d0710
VALUES
IN ('2024-01-07'),
PARTITION p20242d012d0810
VALUES
IN ('2024-01-08'),
PARTITION p20242d012d0910
VALUES
IN ('2024-01-09'),
PARTITION p20242d012d1010
VALUES
IN ('2024-01-10'),
PARTITION p20242d012d1110
VALUES
IN ('2024-01-11'),
PARTITION p20242d012d1210
VALUES
IN ('2024-01-12'),
PARTITION p20242d012d1310
VALUES
IN ('2024-01-13'),
PARTITION p20242d012d1410
VALUES
IN ('2024-01-14'),
PARTITION p20242d012d1510
VALUES
IN ('2024-01-15'),
PARTITION p20242d012d1610
VALUES
IN ('2024-01-16'),
PARTITION p20242d012d1710
VALUES
IN ('2024-01-17'),
PARTITION p20242d012d1810
VALUES
IN ('2024-01-18'),
PARTITION p20242d012d1910
VALUES
IN ('2024-01-19'),
PARTITION p20242d012d2010
VALUES
IN ('2024-01-20'),
PARTITION p20242d012d2110
VALUES
IN ('2024-01-21'),
PARTITION p20242d012d2210
VALUES
IN ('2024-01-22'),
PARTITION p20242d012d2310
VALUES
IN ('2024-01-23'),
PARTITION p20242d012d2410
VALUES
IN ('2024-01-24'),
PARTITION p20242d012d2510
VALUES
IN ('2024-01-25'),
PARTITION p20242d012d2610
VALUES
IN ('2024-01-26'),
PARTITION p20242d012d2710
VALUES
IN ('2024-01-27'),
PARTITION p20242d012d2810
VALUES
IN ('2024-01-28'),
PARTITION p20242d012d2910
VALUES
IN ('2024-01-29'),
PARTITION p20242d012d3010
VALUES
IN ('2024-01-30'),
PARTITION p20242d012d3110
VALUES
IN ('2024-01-31'),
PARTITION p20242d022d0110
VALUES
IN ('2024-02-01'),
PARTITION p20242d022d0210
VALUES
IN ('2024-02-02'),
PARTITION p20242d022d0310
VALUES
IN ('2024-02-03'),
PARTITION p20242d022d0410
VALUES
IN ('2024-02-04'),
PARTITION p20242d022d0510
VALUES
IN ('2024-02-05'),
PARTITION p20242d022d0610
VALUES
IN ('2024-02-06'),
PARTITION p20242d022d0710
VALUES
IN ('2024-02-07'),
PARTITION p20242d022d0810
VALUES
IN ('2024-02-08'),
PARTITION p20242d022d0910
VALUES
IN ('2024-02-09'),
PARTITION p20242d022d1010
VALUES
IN ('2024-02-10'),
PARTITION p20242d022d1110
VALUES
IN ('2024-02-11'),
PARTITION p20242d022d1210
VALUES
IN ('2024-02-12'),
PARTITION p20242d022d1310
VALUES
IN ('2024-02-13'),
PARTITION p20242d022d1410
VALUES
IN ('2024-02-14'),
PARTITION p20242d022d1510
VALUES
IN ('2024-02-15'),
PARTITION p20242d022d1610
VALUES
IN ('2024-02-16'),
PARTITION p20242d022d1710
VALUES
IN ('2024-02-17'),
PARTITION p20242d022d1810
VALUES
IN ('2024-02-18'),
PARTITION p20242d022d1910
VALUES
IN ('2024-02-19'),
PARTITION p20242d022d2010
VALUES
IN ('2024-02-20'),
PARTITION p20242d022d2110
VALUES
IN ('2024-02-21'),
PARTITION p20242d022d2210
VALUES
IN ('2024-02-22'),
PARTITION p20242d022d2310
VALUES
IN ('2024-02-23'),
PARTITION p20242d022d2410
VALUES
IN ('2024-02-24'),
PARTITION p20242d022d2510
VALUES
IN ('2024-02-25'),
PARTITION p20242d022d2610
VALUES
IN ('2024-02-26'),
PARTITION p20242d022d2710
VALUES
IN ('2024-02-27'),
PARTITION p20242d022d2810
VALUES
IN ('2024-02-28'),
PARTITION p20242d022d2910
VALUES
IN ('2024-02-29'),
PARTITION p20242d032d0110
VALUES
IN ('2024-03-01'),
PARTITION p20242d032d0210
VALUES
IN ('2024-03-02'),
PARTITION p20242d032d0310
VALUES
IN ('2024-03-03'),
PARTITION p20242d032d0410
VALUES
IN ('2024-03-04'),
PARTITION p20242d032d0510
VALUES
IN ('2024-03-05'),
PARTITION p20242d032d0610
VALUES
IN ('2024-03-06'),
PARTITION p20242d032d0710
VALUES
IN ('2024-03-07'),
PARTITION p20242d032d0810
VALUES
IN ('2024-03-08'),
PARTITION p20242d032d0910
VALUES
IN ('2024-03-09'),
PARTITION p20242d032d1010
VALUES
IN ('2024-03-10'),
PARTITION p20242d032d1110
VALUES
IN ('2024-03-11'),
PARTITION p20242d032d1210
VALUES
IN ('2024-03-12'),
PARTITION p20242d032d1310
VALUES
IN ('2024-03-13'),
PARTITION p20242d032d1410
VALUES
IN ('2024-03-14'),
PARTITION p20242d032d1510
VALUES
IN ('2024-03-15'),
PARTITION p20242d032d1610
VALUES
IN ('2024-03-16'),
PARTITION p20242d032d1710
VALUES
IN ('2024-03-17'),
PARTITION p20242d032d1810
VALUES
IN ('2024-03-18'),
PARTITION p20242d032d1910
VALUES
IN ('2024-03-19'),
PARTITION p20242d032d2010
VALUES
IN ('2024-03-20'),
PARTITION p20242d032d2110
VALUES
IN ('2024-03-21'),
PARTITION p20242d032d2210
VALUES
IN ('2024-03-22'),
PARTITION p20242d032d2310
VALUES
IN ('2024-03-23'),
PARTITION p20242d032d2410
VALUES
IN ('2024-03-24'),
PARTITION p20242d032d2510
VALUES
IN ('2024-03-25'),
PARTITION p20242d032d2610
VALUES
IN ('2024-03-26'),
PARTITION p20242d032d2710
VALUES
IN ('2024-03-27'),
PARTITION p20242d032d2810
VALUES
IN ('2024-03-28'),
PARTITION p20242d032d2910
VALUES
IN ('2024-03-29'),
PARTITION p20242d032d3010
VALUES
IN ('2024-03-30'),
PARTITION p20242d032d3110
VALUES
IN ('2024-03-31'),
PARTITION p20242d042d0110
VALUES
IN ('2024-04-01'),
PARTITION p20242d042d0210
VALUES
IN ('2024-04-02'),
PARTITION p20242d042d0310
VALUES
IN ('2024-04-03'),
PARTITION p20242d042d0410
VALUES
IN ('2024-04-04'),
PARTITION p20242d042d0510
VALUES
IN ('2024-04-05'),
PARTITION p20242d042d0610
VALUES
IN ('2024-04-06'),
PARTITION p20242d042d0710
VALUES
IN ('2024-04-07'),
PARTITION p20242d042d0810
VALUES
IN ('2024-04-08'),
PARTITION p20242d042d0910
VALUES
IN ('2024-04-09'),
PARTITION p20242d042d1010
VALUES
IN ('2024-04-10'),
PARTITION p20242d042d1110
VALUES
IN ('2024-04-11'),
PARTITION p20242d042d1210
VALUES
IN ('2024-04-12'),
PARTITION p20242d042d1310
VALUES
IN ('2024-04-13'),
PARTITION p20242d042d1410
VALUES
IN ('2024-04-14'),
PARTITION p20242d042d1510
VALUES
IN ('2024-04-15'),
PARTITION p20242d042d1610
VALUES
IN ('2024-04-16'),
PARTITION p20242d042d1710
VALUES
IN ('2024-04-17')
) DISTRIBUTED BY HASH(`aff_arg_no`) BUCKETS AUTO PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"min_load_replica_num" = "-1",
"bloom_filter_columns" = "aff_arg_no",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);
CREATE TABLE
`K_DAY_AVE_BAL2` (
`aff_arg_no` CHAR(55) NOT NULL,
`arg_no` CHAR(55) NOT NULL,
`org_no` CHAR(50) NOT NULL,
`stt_dat` DATE NOT NULL,
`acct_no` CHAR(10) NULL,
`end_dat` DATE NULL,
`bal` DECIMAL(22, 2) NULL,
`last_bal` DECIMAL(22, 2) NULL
) ENGINE = OLAP UNIQUE KEY(`aff_arg_no`, `arg_no`, `org_no`, `stt_dat`) COMMENT 'OLAP' AUTO PARTITION BY RANGE date_trunc(stt_dat, 'month') (
PARTITION p20231201000000
VALUES
[('2023-12-01'),
('2024-01-01')
),
PARTITION p20240101000000
VALUES
[('2024-01-01'),
('2024-02-01')
),
PARTITION p20240201000000
VALUES
[('2024-02-01'),
('2024-03-01')
),
PARTITION p20240301000000
VALUES
[('2024-03-01'),
('2024-04-01')
),
PARTITION p20240401000000
VALUES
[('2024-04-01'),
('2024-05-01')
)
) DISTRIBUTED BY HASH(`aff_arg_no`, `stt_dat`) BUCKETS AUTO PROPERTIES (
"replication_allocation" = "tag.location.default: 3",
"min_load_replica_num" = "-1",
"bloom_filter_columns" = "aff_arg_no",
"is_being_synced" = "false",
"storage_medium" = "hdd",
"storage_format" = "V2",
"inverted_index_storage_format" = "V1",
"enable_unique_key_merge_on_write" = "true",
"light_schema_change" = "true",
"store_row_column" = "true",
"disable_auto_compaction" = "false",
"enable_single_replica_compaction" = "false",
"group_commit_interval_ms" = "10000",
"group_commit_data_bytes" = "134217728"
);