Spark sql从不同文件中读数据,并写到不同文件中package cn.kfc.dem07
//jdbc中读取数据
//保存成各种格式
import java.util.Properties
import org.apache.spark.SparkContext
import org.apache.spark.sql.{
DataFrame, Dataset, Row, SparkSession}
object JdbcDataSource {
def main(args: Array[String]): Unit = {
val spark: SparkSession = SparkSession.builder()
.master("local[*]")
.appName("spark_Jdbc")
.getOrCreate()
import spark.implicits._
val logs: DataFrame = spark.read.format("jdbc").