Passing parameters to Impala shell
<p>I am running a impala query in while loop and for that I have created one separate query file and I am calling it from my shell script.</p>

<p>My question is: Can we pass shell variable matching with impala query in query file?</p>

<pre><code>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}}"
</code></pre>

<p>'A' value is like <code>INSERT_SBP_ME_VS_ME_INCOME_LAST_THIRTY_DAYS_Q1</code> (as count is 1)</p>

<p>I am doing this in this way but getting <code>bad substitution error</code> and I also tried </p>

<pre><code>${IMPALA_CON}  -q "${A}"
</code></pre>

<p>but not getting a successful result.</p>