title: How to output the result of an Impala query along with the query
body: <p>Is there a way to output the result of an Impala query along with the query?</p>
  
  <p>For example, if my query was <code>'show databases'</code>, I'd like to output the result to a file with something like this:</p>
  
  <pre><code>Query: show databases
  Result: ------default-------
  </code></pre>
  
  <p>When I run <code>impala-shell -i someip -f 'filename' -o 'output'</code>, I only see the results, one after one, so it's difficult to correlate which result goes with which query (especially when the input file contains a lot of queries).</p>