Skip to content

Instantly share code, notes, and snippets.

@marhan
Created June 2, 2019 12:55
Show Gist options
  • Save marhan/1eed361214cd961a6a8c2719f46dcf70 to your computer and use it in GitHub Desktop.
Save marhan/1eed361214cd961a6a8c2719f46dcf70 to your computer and use it in GitHub Desktop.
Spark Scala Import Data into PostgreSQL
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