title: Spark SQL passing a variable
body: <p>I have following Spark sql and I want to pass variable to it. How to do that? I tried following way.</p>
  
  <pre><code> sqlContext.sql("SELECT count from mytable WHERE id=$id")
  </code></pre>