Skip to content

Instantly share code, notes, and snippets.

@fmarchand
Created January 16, 2019 12:43
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 fmarchand/4195e397ff4c064dfd427be7a0d841ad to your computer and use it in GitHub Desktop.
Save fmarchand/4195e397ff4c064dfd427be7a0d841ad to your computer and use it in GitHub Desktop.
val options = Map(
"url" -> dbUrl,
"dbtable" -> tableName,
"user" -> userName,
"password" -> userPassword,
"driver" -> "com.mysql.jdbc.Driver"
)
val queries = spark.read.format("jdbc").options(options).load
queries.cache()
queries.count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment