maxcompute查询事务表报错不支持此方法

Viewed 40

问题:maxcompute表是事务主键表,支持Upsert入库;但是在doris执行查询报错不支持此类型,有望支持嘛🌹~

场景:使用catalog接入maxcompute数据源查询数据,插入doris中。

参考:https://help.aliyun.com/zh/maxcompute/user-guide/table-operations-1?spm=a2c4g.11186623.0.0.1b09b22585yxv1#4be4a2800f8td
图片

示例:
1.SELECT * from mc_pro.datax.ods_data_t1_base;
2. create table demo.mc_test as
SELECT * from mc_pro.datax.ods_data_t1_base;

版本:
doris版本:2.1.5单机
maxcompute 数据类型2.0

异常:SQL 错误 [1105] [HY000]: errCode = 2, detailMessage = Unexpected exception: RequestId=2024xxxx, ErrorCode=MethodNotAllowed, ErrorMessage=Upsert is not supported

2 Answers

麻烦把maxcpompute catalog创建语句和对应的表结构提供一下的

maxcompute sql:
CREATE TABLE IF NOT EXISTS ods_push_log_base (
id BIGINT not null COMMENT '编码'
, storage STRING COMMENT '仓库'
, transfer_party STRING COMMENT '调取方'
, send_data STRING COMMENT '发送数据'
, receive_code STRING COMMENT '接收编码'
,operation_flag STRING COMMENT '最新数据状态'
,create_time DATETIME COMMENT '最新同步时间'
,utc_timestamp BIGINT COMMENT 'binlog时间'
) tblproperties ("comment"="推送日志-flink",
"transactional"="true",
"write.bucket.num" = "64",
"acid.data.retain.hours"="12") ;

CREATE CATALOG mc_pro PROPERTIES (
"type" = "max_compute",
"mc.region" = "cn-beijing",
"mc.default.project" = "test",
"mc.access_key" = "xxxxx",
"mc.secret_key" = "xxxxxx",
"mc.odps_endpoint" = "http://service.cn-beijing.maxcompute.aliyun.com/api",
"mc.tunnel_endpoint" = "http://dt.cn-beijing.maxcompute.aliyun.com"
);

SELECT max(create_time) FROM mc_pro.test.ods_push_log_base LIMIT 1;