Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val table = "retail_db.orders"
- val orders = spark.read.
- format("jdbc").
- option("url", "jdbc:mysql://ms.itversity.com").
- option("dbtable", table).
- option("user", "retail_user").
- option("password", "itversity").
- load()
- val orders = spark.read.
- jdbc("jdbc:mysql://ms.itversity.com", table,
- properties={"user": "retail_user",
- "password": "itversity"})
- orders.show()
- orders.printSchema()
Add Comment
Please, Sign In to add comment