Reputation: 31
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?
Upvotes: 1
Views: 244
Reputation: 661
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))
Upvotes: 2