spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gavin zhang <>
Subject How to use DataFrame with MySQL
Date Sun, 22 Mar 2015 14:32:21 GMT
OK, I have known that I could use jdbc connector to create DataFrame with
this command:

val jdbcDF = sqlContext.load("jdbc", Map("url" ->
"dbtable" -> "video"))

But I got this error: 

java.sql.SQLException: No suitable driver found for ...

And I have tried to add jdbc jar to spark_path with both commands but

- spark-shell --jars mysql-connector-java-5.0.8-bin.jar
- SPARK_CLASSPATH=mysql-connector-java-5.0.8-bin.jar spark-shell

My Spark version is 1.3.0 while
`Class.forName("com.mysql.jdbc.Driver").newInstance` is worked.

View this message in context:
Sent from the Apache Spark User List mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message