spylon-kernel icon indicating copy to clipboard operation
spylon-kernel copied to clipboard

Share additional variables between Python and Scala

Open parente opened this issue 8 years ago • 2 comments

If possible:

  1. Share a Spark session / context initialized from Python with code running in %%scala cells. As it stands, the first scala cell tries to initialize another Spark context which fails.
  2. Share additional variables between Scala and %%python cells. This is already somewhat possible using the interpret and last_result calls but can be made prettier.

parente avatar Mar 28 '17 17:03 parente

So for 1 the idea is to use the %%init_spark magic

mariusvniekerk avatar Mar 28 '17 18:03 mariusvniekerk

Hi @mariusvniekerk, could you provide details about how I might achieve that i.e using python SparkContext inside scala?

ksangeet9ap avatar May 19 '20 05:05 ksangeet9ap