Guest User

Untitled

a guest
Dec 28th, 2018
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. val table = "retail_db.orders"
  2.  
  3. val orders = spark.read.
  4. format("jdbc").
  5. option("url", "jdbc:mysql://ms.itversity.com").
  6. option("dbtable", table).
  7. option("user", "retail_user").
  8. option("password", "itversity").
  9. load()
  10.  
  11. val orders = spark.read.
  12. jdbc("jdbc:mysql://ms.itversity.com", table,
  13. properties={"user": "retail_user",
  14. "password": "itversity"})
  15.  
  16. orders.show()
  17. orders.printSchema()
Add Comment
Please, Sign In to add comment