Pyspark — Parallel read from database

How to leverage spark to read in parallel from a database

A usual way to read from a database, e.g. Postgres, using spark would be something like the following: