0
我正在while循环中运行impala查询,并且为此我创建了一个单独的查询文件,并且从我的shell脚本调用它我的问题是,我们可以通过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。 –