【发布时间】:2023-04-05 06:23:01
【问题描述】:
我在 while 循环中运行 impala 查询,为此我创建了一个单独的查询文件,我从我的 shell 脚本中调用它我的问题是, 我们可以在查询文件中传递与 impala 查询匹配的 shell 变量吗?
A="INSERT_SBP_ME_VS_ME_INCOME_LAST_THIRTY_DAYS_Q"${Count}
echo "value of A is $A"
source ${SBP2_MNY_IN_LAST_THIRTY_DAYS_QF}
${IMPALA_CON} -q "${${A}}"
A value is like INSERT_SBP_ME_VS_ME_INCOME_LAST_THIRTY_DAYS_Q1 (as count is 1)
I am doing this in this way but getting bad substitution error and I also tried
${IMPALA_CON} -q "${A}" but not getting any successful result
【问题讨论】:
-
您使用的是哪个 shell bash 或其他什么?
-
@RamPrasadG 我正在使用 Bash shell。