Skip to content

Instantly share code, notes, and snippets.

@danared danared/mongospark
Created Jun 24, 2016

What would you like to do?
def main(args: Array[String]): Unit = {
// Set up configurations
val sc = getSparkContext()
val sqlContext = SQLContext.getOrCreate(sc)
val readConfig = ReadConfig(Map("uri" -> "mongodb://"))
val writeConfig = WriteConfig(Map("uri" -> "mongodb://"))
val userId = 0
// Load the movie rating data
val movieRatings = MongoSpark.load(sc, readConfig).toDF[UserMovieRating]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.