Created
June 2, 2019 12:55
-
-
Save marhan/1eed361214cd961a6a8c2719f46dcf70 to your computer and use it in GitHub Desktop.
Spark Scala Import Data into 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
account.write | |
.format("jdbc") | |
.option("url", "jdbc:postgresql://localhost:5432/zeppelin") | |
.option("dbtable", "public.account") | |
.option("user", "zeppelin") | |
.option("password", "zeppelin") | |
.option("driver", "org.postgresql.Driver") | |
.mode("overwrite") | |
.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment