0
votes

I am trying to load a spark scala script into a spark shell using load command where the location of the script is passed in a variable. It's not working

val scriptLoc="/abc/spark"  
:load ${scriptLoc}/scriptName.scala

Even tried like this which didn't work either

:load scriptLoc/scriptName.scala

Any help would be appreciated.

1
How about :load s"$scriptLoc/scriptName.scala" - Tanjin
Tried that and it didn't work either. - Lux
Can you attach the error what you are getting? - Subash

1 Answers

0
votes

You can try

spark-shell -i /path/to/file.scala