Skip to content

Instantly share code, notes, and snippets.

@1ambda
Created December 24, 2021 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 1ambda/9d38856076081d37e2ca5d861bbbc8d5 to your computer and use it in GitHub Desktop.
Save 1ambda/9d38856076081d37e2ca5d861bbbc8d5 to your computer and use it in GitHub Desktop.
dfListingTruncated\
.repartition(3)\
.write\
.mode("append")\
.format("jdbc")\
.option("driver", "com.mysql.jdbc.Driver")\
.option("url", "jdbc:mysql://localhost:3306?useSSL=false")\
.option("dbtable", "pipeline.ListingMeta")\
.option("user", "root")\
.option("password", "root")\
.option("numPartitions", "2")\
.option("truncate", "true")\
.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment