title: How to pass variable into SQL string
body: <p>I have one spark sql query which is accepting value as long. </p>
  
  <pre><code>Dataset getQuery = spark.sql("select * from trafficdata where message_time between 1486036800000 and 1486108800000 ")
  </code></pre>
  
  <p>i want this time to be as variables like</p>
  
  <pre><code>Long val1 = 1486036800000
  Long val2 = 1486108800000
  Dataset getQuery = spark.sql("select * from trafficdata where message_time between $val1 and $val2 ")
  </code></pre>
  
  <p>i tried with <code>$val1</code> but its not working. Could anyone suggest, how to do that in java?</p>