Error: not found: value sc

scala> val rdd=sc.textFile(“”)
:17: error: not found: value sc
val rdd=sc.textFile(“”)

Please tell me how to resolve this.

I’m running spark 2.1.0

If not resolved the issue …

In spark 2.1 spark context is available as spark session (sc as spark) . so use

spark.textFile(“”) it will work …

Hi all,
I have the same issue and is not working even using spark instide of sc.
val rdd=spark.textFile(“”)
I am using spark 2.1.1, windows 10 using virtualbox.
please help me.