版本是
Doris 3.0.4 + paimon 1.2
问题:
这种可行
这种报错
catalog的构建
CREATE CATALOG `PaimonDataBase` PROPERTIES (
"warehouse" = "cosn://cosn-prod-1302770967/paimon",
"type" = "paimon",
"cos.secret_key" = "*XXX",
"cos.endpoint" = "cos.ap-chengdu.myqcloud.com",
"cos.access_key" = ""
);
构建表
CREATE TABLE IF NOT EXISTS paimon_catalog.fj_dwd.dwd_globally_maat_log_click_events(
hs_user_id STRING COMMENT '',
client_date DATE COMMENT '客户端日期',
client_time TIMESTAMP COMMENT '客户端时间',
data_type STRING COMMENT '事件类型',
page_id STRING COMMENT '页面ID',
page_value STRING COMMENT '页面值',
target_name STRING COMMENT '目标名称',
app_name STRING COMMENT '应用名称',
src STRING COMMENT '',
value_c_path STRING COMMENT '内容路径(从content解析value.c.path)',
ua STRING COMMENT '用户代理(从system_common解析UA)',
system_type STRING COMMENT '系统类型',
event_element STRING COMMENT '事件元素',
ip_address STRING COMMENT 'IP地址',
data_flag STRING COMMENT '',
create_time TIMESTAMP COMMENT '创建时间',
update_time TIMESTAMP COMMENT '更新时间',
mt string comment '分区字段'
)PARTITIONED BY (mt)
WITH (
'bucket' = '-1', --创建Paimon Append Only表时,在WITH参数中指定'bucket' = '-1',将会创建Append Scalable表。
'partition.timestamp-pattern' = 'yyyyMM',
'partition.timestamp-pattern' = '$mt',
'partition.expiration-time' = '365d',
'write-mode' = 'append-only',
'metadata.stats-mode' = 'none', -- 关闭统计信息收集以提高写入效率
'num-sorted-run.stop-trigger' = '2147483647', -- 小文件合并完全异步化
'sort-spill-threshold' = '10', -- 当小文件数量超过阈值时启用外部排序
'changelog-producer.lookup-wait' = 'false' -- 允许已完成小文件合并的并发继续处理后续数据
);
案例数据数据
hs_user_id client_date client_time data_type page_id page_value target_name app_name src value_c_path ua system_type event_element ip_address data_flag create_time update_time mt
2025/5/29 2025/5/29 20:34 ON_BUSINESS SDK_V1 generic_web_app_market_mounted fe-fjkt-generic-web dsai 111.32.99.40 渠道码点击 17:13.1 17:13.1 202505