Skip to content

ramansahu/MongoDB_Spark_Course

 
 

Repository files navigation

MongoDB_Spark_Course

Code materials for the MongoDB Spark Course

Once Spark and MongoDB are up and running, and you've imported the dataset. You can check that everything is ready for the workshop with this following set of commands

Execute me from the command line

./bin/spark-shell --conf "spark.mongodb.input.uri=mongodb://127.0.0.1/nasa.eva" --conf "spark.mongodb.output.uri=mongodb://127.0.0.1/nasa.astronautTotals" 
--packages org.mongodb.spark:mongo-spark-connector_2.10:0.1

Once in the Spark Shell Execute this

import com.mongodb.spark._
import com.mongodb.spark.rdd.MongoRDD
sc.loadFromMongoDB().take( 10 ).foreach( println )

About

Code materials for the MongoDB Spark Course

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 39.6%
  • Java 39.0%
  • Scala 21.4%