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()

  }
}
 

  

相关文章:

  • 2021-07-25
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
  • 2021-10-02
  • 2021-04-19
  • 2021-05-29
猜你喜欢
  • 2021-08-17
  • 2022-12-23
  • 2021-12-17
  • 2021-09-16
  • 2022-12-23
  • 2022-12-23
  • 2021-12-22
相关资源
相似解决方案