title: How can i use the mysql query result in hive query
body: <p>I have a requirement like using mysql query result into hive query in shell script for this I have implemented below code </p>
  
  <pre><code>ctrl_tbl_date=`mysql -N -h ${Mysql_Host_Name} -u ${Mysql_Uname} -p${Mysql_pwd} -e "use ${MySQLDB};select max(Processing_Datetime) from ${Ctrl_Tbl}:"`
  
  echo "$ctrl_tbl_date"&gt;&gt;/edh_fw/scripts/sqoop_export_by_key/out_test6.txt 
  
  echo "taking the data which is satisfying below conditions"
  
  temp=hive -v -e "set hive.exec.compress.output=false;insert overwrite directory '${temp_incremental_loc}' row format delimited fields terminated by '\t' stored as textfile select * from ${src_table} where createDate&gt;'${ctrl_tbl_date}';"
  
  echo "$temp"&gt;&gt;/edh_fw/scripts/sqoop_export_by_key/out_test7.txt 
  </code></pre>
  
  <p>I'm passing every value as a dynamic from execution line I have initialized on top of the script .. Here I'm not getting the <code>ctrl_tbl_date</code> into hive query of course MYSQL result is not assigning to the variable...Kindly help me on this </p>