Created
April 18, 2017 21:06
-
-
Save marhan/ab6409cfe3000b7c8a9aaf0e55c013bb to your computer and use it in GitHub Desktop.
Export spark data frame into PostgreSQL database (Zeppelin paragraph)
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
%spark | |
data.write | |
.format("jdbc") | |
.option("url", "jdbc:postgresql://SERVER:5432/DATABASE") | |
.option("dbtable", "public.account") | |
.option("user", "zeppelin") | |
.option("password", "PASSWORD") | |
.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