标签:enc div nic mysql localhost reading pack apache load
package operationMysql import config.conf.{sc, spark_session} import org.apache.spark.sql.DataFrame object readingMysqlOperation { def main(args: Array[String]): Unit = { val df: DataFrame = spark_session.read .format("jdbc") .option("url", "jdbc:mysql://localhost:3306/junsheng?useUnicode=true&characterEncoding=utf-8") .option("dbtable", "订单") .option("user", "root") .option("password", "123456") .load() df.show() } }
标签:enc div nic mysql localhost reading pack apache load
原文地址:https://www.cnblogs.com/wuzaipei/p/12623880.html