Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val df = spark.read.format("jdbc")
- .option("url", "jdbc:mysql://localhost:3306/yourDatabase?useSSL=false")
- .option("driver", "com.mysql.jdbc.Driver")
- .option("dbtable", "tablename")
- .option("user", "user-name")
- .option("password", "user-password")
- .load()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement