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。 –