In an Ammonite session, use this instead of SparkSession.builder().
In an Ammonite session, use this instead of SparkSession.builder().
Example
@ import $ivy.`org.apache.spark::spark-sql:2.2.1` @ import $ivy.`sh.almond::ammonite-spark:0.1.0-SNAPSHOT` @ import org.apache.spark.sql._ @ val spark = AmmoniteSparkSession.builder().appName("test-ammonite").getOrCreate() @ def sc = spark.sparkContext @ val rdd = sc.parallelize(1 to 100, 10)
Should be called if new dependencies were added to the session *after* the SparkSession was created.
Should be called if new dependencies were added to the session *after* the SparkSession was created.
Example
@ import $ivy.`org.apache.spark::spark-sql:2.2.1` @ import $ivy.`sh.almond::ammonite-spark:0.1.0-SNAPSHOT` @ import org.apache.spark.sql._ @ val spark = AmmoniteSparkSession.builder().appName("test-ammonite").getOrCreate() @ import $ivy.`com.twitter::algebird-spark:0.13.0` @ AmmoniteSparkSession.sync()