我想在easyscheduler 中 使用shell组件完成 sql分区运算的代码,然后传递到后方sql组件中去运行, 但是使用自定义参数传递不到下个组件,这一方面要如何取解决(beeline/外部文件是是用不了的,不考虑这个)
代码:
#!/bin/bash
PART_COUNT=4
sql_commands=''
trans=''
for ((remainder=0; remainder<PART_COUNT; remainder++)); do
sql_commands+="with dwb_tb as (
select func_id
from eww_uat.ads_test
where dt = '${currentDate}'
and func_id % ${PART_COUNT} = ${remainder}
)
insert into table eww_uat.bwb_test partition(dt ='${currentDate}', path ='${remainder}')
SELECT func_id, count(func_id) as func_uv from dwb_tb
GROUP BY func_id;"
done
echo "sql_commands=$sql_commands"
(不知道es支不支持setvalue)
也是设置了自定义参数 sql_commands $sql_commands
下游引用$sql_commands出不来代码