title: How to specify multiple tables in Spark SQL?
body: <p>I have a code where I need to set three tables. To do that I need to call <code>jdbc</code> function three times for each table. See code below</p>
  
  <pre><code>val props = new Properties
      props.setProperty("user", "root")
      props.setProperty("password", "pass")
  
  val df0 = sqlContext.read.jdbc(
    "jdbc:mysql://127.0.0.1:3306/Firm42", "company", props)
  
  val df1 = sqlContext.read.jdbc(
    "jdbc:mysql://127.0.0.1:3306/Firm42", "employee", props)
  
  val df2 = sqlContext.read.jdbc(
    "jdbc:mysql://127.0.0.1:3306/Firm42", "company_employee", props)
  
  df0.registerTempTable("company")
  df1.registerTempTable("employee")
  df2.registerTempTable("company_employee")
  
  val rdf = sqlContext.sql(
    """some_sql_query_with_joins_of_various_tables""".stripMargin)
  
  rdf.show
  </code></pre>
  
  <p>Is it possible to simplify my code? Or maybe there is some way to specify multiple tables somewhere in SQL configuration.</p>