title: Cannot resolve symbol read in org.apache.spark.read
body: <p>What is the problem with following code in scala spark?</p>
  
  <pre><code>import org.apache.spark
  // ...
  val path in = "D:\\myfolder\\myfile.csv"
  spark.read(pathIn).csv()
  </code></pre>
  
  <blockquote>
    <p>error: cannot resolve symbol "read"</p>
  </blockquote>
  
  <p>pom.xml dependencies:</p>
  
  <pre><code>&lt;properties&gt;
      &lt;maven.compiler.source&gt;1.8&lt;/maven.compiler.source&gt;
      &lt;maven.compiler.target&gt;1.8&lt;/maven.compiler.target&gt;
      &lt;encoding&gt;UTF-8&lt;/encoding&gt;
      &lt;scala.version&gt;2.12.1&lt;/scala.version&gt;
      &lt;scala.compat.version&gt;2.12&lt;/scala.compat.version&gt;
    &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.scala-lang&lt;/groupId&gt;
              &lt;artifactId&gt;scala-library&lt;/artifactId&gt;
              &lt;version&gt;2.12.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.scalatest&lt;/groupId&gt;
              &lt;artifactId&gt;scalatest_2.12&lt;/artifactId&gt;
              &lt;version&gt;3.0.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;!-- https://mvnrepository.com/artifact/org.apache.spark/spark-core --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.spark&lt;/groupId&gt;
              &lt;artifactId&gt;spark-core_2.12&lt;/artifactId&gt;
              &lt;version&gt;2.4.4&lt;/version&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
  
  </code></pre>
  
  <p>I have added some dependencies cuz can't import SparkSession.</p>