I have Spark 1.6 and trying to read a csv (or tsv) file as a dataframe. Here are the steps I take:
scala> val sqlContext= new org.apache.spark.sql.SQLContext(sc)
scala> import sqlContext.implicits._
scala> val df = sqlContext.read
scala> .format("com.databricks.spark.csv")
scala> .option("header", "true")
scala.option("inferSchema", "true")
scala> .load("data.csv")
scala> df.show()
Error:
<console>:35: error: value show is not a member of org.apache.spark.sql.DataFrameReader df.show()
The last command is supposed to show the first few lines of the dataframe, but I get the error message. Any help will be much appreciated.