doris 版本2.0.11
CREATE TABLE ods_cp.sta_electricity_service_fee_agg
(
station_id
varchar(30) COMMENT "场站id",
duration
bigint SUM DEFAULT "0" COMMENT "充电时长 充电时长单位秒",
charging_electricity
decimal(18,3) SUM DEFAULT "0" COMMENT "总充电量",
total_electricity_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "总电费",
total_service_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "总服务费",
total_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "总费用",
pay_electricity_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "应付充电费",
pay_service_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "应付服务费",
pay_fee
decimal(18,2) SUM DEFAULT "0" COMMENT "应付总金额",
min_order_time
datetime MIN COMMENT "第一笔订单时间",
max_order_time
datetime MAX COMMENT "最后一笔订单时间"
)
AGGREGATE KEY(station_id
)
DISTRIBUTED BY HASH(station_id
) BUCKETS 1
PROPERTIES (
"replication_allocation" = "tag.location.default: 3"
);
CREATE ROUTINE LOAD ods_cp.sta_electricity_service_fee_agg ON sta_electricity_service_fee_agg
COLUMNS(station_id,duration,charging_electricity,total_electricity_fee,total_service_fee,total_fee,pay_electricity_fee
,pay_service_fee,pay_fee,min_order_time=end_time,max_order_time=end_time)
PROPERTIES
(
"desired_concurrent_number"="1",
"format" = "json",
"strict_mode" = "false",
"timezone"="Asia/Shanghai"
)
FROM KAFKA
(
"kafka_broker_list" = "ip:9092",
"kafka_topic" = "acp-ord-charge-order",
"property.group.id" = "sta_electricity_service_fee_agg",
"property.kafka_default_offsets" = "OFFSET_BEGINNING"
);
报错:ErrorReason{code=errCode = 2, msg='failed to create task: errCode = 2, detailMessage = unknown reference column, column=max_order_time, reference=end_time'}