title: Error package org.apache.spark.sql is not a value when I try to compile a SBT in Spark- Scala
body: <p>I'm trying to compile a SBT package in Apache Spark (Scala) but receive the following error:</p>
  
  
  
  <pre class="lang-scala prettyprint-override"><code>[error] /home/bigdata/jgarcia2/test/src/main/scala/test.scala:37: package org.apache.spark.sql is not a value
  [error] val dbschema = sql("SELECT * From table")
  </code></pre>
  
  <p>This is my code:</p>
  
  <pre class="lang-scala prettyprint-override"><code>import org.apache.spark._
  import org.apache.log4j.Logger
  import org.apache.log4j.Level
  import org.apache.spark.sql.SQLContext
  import org.apache.spark.sql._
  import org.apache.spark.SparkContext
  import org.apache.spark.SparkContext._
  import org.apache.spark.SparkConf
  object test {
  
  
    def main(args: Array[String]) {
  
  
      Logger.getLogger("org").setLevel(Level.OFF)
      Logger.getLogger("akka").setLevel(Level.OFF)
  
  
      if (args.length &lt; 1) {
        System.err.println("Usage: test &lt;file&gt;")
        System.exit(1)
      }
  
      val sparkConf = new SparkConf().setAppName("test")
      val sc = new SparkContext(sparkConf)
      val sqlContext = new SQLContext(sc)
      val df = sqlContext.read.format("com.databricks.spark.xml").option("rowTag", "row").load(args(0))
      df.registerTempTable("table")
  
      val dbschema = sql("SELECT * From table")
      dbschema.printSchema()
      sc.stop()
    } }
  </code></pre>
  
  <p>Can anyone help me to solve the problem? </p>