Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- spark-shell
- import org.apache.spark.sql.SparkSession
- val url="jdbc:mysql://localhost:3306/slow_and_tedious"
- val prop = new java.util.Properties
- prop.setProperty("user",”scalauser”)
- prop.setProperty("password","scalauser123")
- val people = spark.read.jdbc(url,"sat",prop)
- import org.apache.spark.sql.SparkSession
- val url="jdbc:mysql://localhost:3306/slow_and_tedious"
- val prop = new java.util.Properties
- prop.setProperty("user",”scalauser”)
- prop.setProperty("password","scalauser123")
- val people = spark.read.jdbc(url,"sat",prop)
- spark-shell --jars mysql-connector.jar
- scala> :load /path/test.scala
Add Comment
Please, Sign In to add comment