为了更快的定位您的问题,请提供以下信息,谢谢
【详述】load同步失败
【背景】hive表更变结构后,sr同步hive数据失败
【业务影响】
【是否存算分离】
【StarRocks版本】例如:3.1.4、3.2.3
【集群规模】例如:3fe(1 follower+2observer)+5be(fe与be混部)
【机器信息】CPU虚拟核/内存/网卡,例如:48C/64G/万兆
【联系方式】社区群1-峻
【附件】
–hive建表
CREATE TABLE temp.sr_test
(
data_type
string COMMENT ‘type,table’,
data
string COMMENT ‘json’)
COMMENT ‘binlog采集’
row format delimited fields terminated by ‘\t’
stored as orc
location ‘s3n://xxx/sr_test’
–插入数据
insert into temp.sr_test(data_type,data) values (‘1’,‘abc1’);
insert into temp.sr_test(data_type,data) values (‘2’,‘abc2’);
–修改表结构
alter table temp.sr_test add columns (‘test2’ string)
–插入数据
insert into temp.sr_test(data_type,data,test2) values (‘5’,‘abc5’,‘test’);
–starrocks建表
CREATE TABLE if not exists sr_test
(
data_type
varchar(30) NOT NULL COMMENT ‘id’,
data
varchar(30) NOT NULL COMMENT ‘用户id’,
test2
varchar(128) DEFAULT NULL COMMENT ‘随机code’
) ENGINE=OLAP
PRIMARY KEY(data_type
) COMMENT “test”
DISTRIBUTED BY HASH(data_type
)
BUCKETS 1
PROPERTIES (
“replication_num” = “1”,
“in_memory” = “false”,
“storage_format” = “DEFAULT”
);
–通过load从数仓同步数据
LOAD LABEL test_db.label_sr_test
(
DATA INFILE(“s3a://xxx/sr_test/*”)
INTO TABLE sr_test
COLUMNS TERMINATED BY “\t”
FORMAT AS “orc”
(data_type,data,test2)
)
WITH BROKER broker1
(
“fs.s3a.access.key” = “”,
“fs.s3a.secret.key” = “”,
“fs.s3a.endpoint” = “”
)
–load同步失败
ErrorMsg: type:LOAD_RUN_FAIL; msg:OrcMappingFactory::_init_orc_mapping not found column name test2