Shibu
Shibu

Reputation: 1542

How to update data in Mysql table from Pyspark

I am able to read data from mysql table in pyspark via

hiveContext.read.format('jdbc').options(url=jdbc_url, dbtable=mysql_query,driver='com.mysql.jdbc.Driver').load()

but I am not able to find a way to update records in mysql. has anyone ever performed an update from pyspark.

Upvotes: 1

Views: 540

Answers (1)

user7311217
user7311217

Reputation: 11

No updates are allowed. You can only:

  • append.
  • overwrite

For updates or other fine grained modifications use standard database client directly.

Upvotes: 1

Related Questions