The missing driver is the JDBC one and you have to add it to the SparkSQL configuration. You can do it through your Properties object with this line:
prop.setProperty("driver", "com.mysql.jdbc.Driver")
Or, in your case, the complete statement should be as below,
val df = spark.read.format("jdbc").option("url", "jdbc:mysql://sqoopdb.edu.cloudlab.com/z_dinesh").option("driver", "com.mysql.jdbc.Driver").option("dbtable", "t").option("user", "labuser").option("password", "edureka").load()
Also, make sure that the MySQL JDBC connection jar is added to the program.
Hope it helps!!
If you need to know more about Java, join our Java online course today.
Thank you