Guest User

Untitled

a guest
Feb 2nd, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. url = "jdbc:mysql://localhost:3306/dbname"
  2. table_df=sqlContext.read.format("jdbc").option("url",url).option("dbtable","table_name").option("user","root").option("password", "root").load()
  3. sqlContext.registerDataFrameAsTable(table_df, "table1")
Add Comment
Please, Sign In to add comment