Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- C:\ spark-shell -–driver-class-path /mysqlc/mysql-connector-java-5.1.43-bin.jar
- val sqlContext = new org.apache.spark.sql.SQLContext(sc)
- val jdbcDF = sqlContext.load("jdbc", Map("url" -> "jdbc:mysql://localhost:3306/dbupm?user=root&password=", "dbtable" -> "usermaster"))
- jdbcDF.count
- jdbcDF.collect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement