Created
June 2, 2019 12:57
-
-
Save marhan/62ca745c6e7c19031a2f82ea13a71ad0 to your computer and use it in GitHub Desktop.
Spark Scala read data from POstgreSQL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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