Skip to content

Instantly share code, notes, and snippets.

@marhan
Created June 2, 2019 12:57
Show Gist options
  • Save marhan/62ca745c6e7c19031a2f82ea13a71ad0 to your computer and use it in GitHub Desktop.
Save marhan/62ca745c6e7c19031a2f82ea13a71ad0 to your computer and use it in GitHub Desktop.
Spark Scala read data from POstgreSQL
var account = spark.read
.format("jdbc")
.option("url", "jdbc:postgresql://localhost:5432/zeppelin")
.option("dbtable", "public.account")
.option("user", "zeppelin")
.option("password", "zeppelin")
.option("driver", "org.postgresql.Driver")
.load()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment