Created
July 25, 2021 16:25
-
-
Save saisgit/d0745bbf7e748b810485df238455edd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.mongodb.spark._ | |
val database = "sample_mflix" | |
val collection = "comments" | |
val movieCommetsDF = ( | |
spark.read | |
.format("com.mongodb.spark.sql.DefaultSource") | |
.option("database", database) | |
.option("collection", collection) | |
.load() | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment