0

I wrote

 a = sc.parallelize([1,2,3])

in spark-shell and got error

error: illegal start of simple expression
       a = sc.parallelize([1,2,3])
                      ^

but when I wrote this in PySpark, it worked.

What's the difference between the two?

Filip
  • 609
  • 7
  • 18
Abhay
  • 21
  • 2

1 Answers1

1

You need to use scala to utilize spark-shell. In this case, it would be something like this

 val a = sc.parallelize(Seq(1, 2, 3))
Filip
  • 609
  • 7
  • 18