1 个回答
首先前提是需要建表的时候指定

-- 'write-only' = 'true'
例如:CREATE TABLE if not EXISTS product1 (product_id BIGINT, price DOUBLE, sales BIGINT)
WITH
(
-- 'target-file-size' = '256 MB',
-- 'file.format' = 'parquet',
-- 'file.compression' = 'zstd',
-- 'file.compression.zstd-level' = '3',
-- 'write-only' = 'true'
);
再进行数据的插入,插入之后执行:-- compact table
CALL sys.compact(`table` => 'default.T');
-- compact table with options
CALL sys.compact(`table` => 'default.T', `options` => 'sink.parallelism=4');
-- compact table partition
CALL sys.compact(`table` => 'default.T', `partitions` => 'p=0');
-- compact table partition with filter
CALL sys.compact(`table` => 'default.T', `where` => 'dt>10 and h<20');
选择任意一个执行即可,如图:
发布于:4个月前 (12-20) IP属地:四川省
我来回答
您需要 登录 后回答此问题!