title: Sparklyr read database table to distributed DF
body: <p>Hi I am trying to figure out if there is a way to directly read a DB table to a sparkR dataframe. I have rstudio installed on an EMR cluster which has my hive metastore on it. </p>
  
  <p>I know I can do the following:</p>
  
  <pre><code>library(sparklyr)
  library(dplyr)
  sc &lt;- spark_connect(master = "local")
  library(DBI)
  query &lt;- "select * from schema.table"
  result &lt;- dbGetQuery(sc, query) 
  result_t &lt;- copy_to(sc,result)
  </code></pre>
  
  <p>but is there a way to query directly into result_t?</p>