Upserting rows in postgresql 9.5 with pySpark
medium.com