Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- %spark
- val opts = Map(
- "url" -> "jdbc:postgresql://172.17.0.2:5432/openflights",
- "driver" -> "org.postgresql.Driver",
- "user" -> "postgres",
- "password" -> "postgres",
- "dbtable" -> "countries")
- val countriesDf = sqlContext.read.format("jdbc").options(opts).load()
- countriesDf.show
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement