【详述】如何通过临时表insert到目标表
【背景】不支持这种写法么,想要通过临时表插入 改怎么写呢
【业务影响】
【StarRocks版本】2.0.1
with tmp as (
select
0 as date_long,
t1.x_regionguid,
t1.proj_guid,
t1.x_regionname,
t1.proj_name,
1 as fin_year_month
from dim.dim_com_proj_info_a t1)
insert into dws.dws_zj_dailyfin_i_ss_test
select
date_long,
x_regionguid,
proj_guid,
x_regionname,
proj_name,
fin_year_month
from tmp
目前这块还不支持,我提个对应的改进,感谢
你好,这个功能预计在2.2版本支持(预计3月底4月初),目前代码已经提交到main分支了。语法为:
insert into t2 with as t1 (select ..) select * from t1