How can I connect to a postgreSQL database into Apache Spark using scala?
问题 I want to know how can I do following things in scala? Connect to a postgreSQL database using Spark scala. Write SQL queries like SELECT , UPDATE etc. to modify a table in that database. I know to do it using scala but how to import the connector jar of psql scala into sbt while packaging it? 回答1: Our goal is to run parallel SQL queries from the Spark workers. Build setup Add the connector and JDBC to the libraryDependencies in build.sbt . I've only tried this with MySQL, so I'll use that in