spark源码
package com.spark
import org.apache.spark.sql.SparkSession
object jiantai04 {
def main(args: Array[String]): Unit = {
val spark: SparkSession = SparkSession
.builder()
.appName("work")
.master("local[*]")
.enableHiveSupport()
.getOrCreate()
spark.read
.format("jdbc")
.option("driver","com.mysql.jdbc.Driver")
.option("url","jdbc:mysql://localhost:3306/ds_db01?useSSL=false")
.option("password","123456")
.option("dbtable","")
.load()
.createOrReplaceTempView("")
spark.sql("use ods")
spark.sql(
"""
|create table if not exists (
|order_detail_id string,
|order_sn string,
|product_id string,
|product_name string,
|product_cnt string,
|product_price string,