hive写mysql时
spark.sql(sql)
.coalesce(2)
.write
.option("truncate", "true")//先删
.mode("overwrite")
.format("parquet")
.option("batchsize",1000) //批次写入调优
.jdbc(url "databases.table", props)
hive写mysql时
spark.sql(sql)
.coalesce(2)
.write
.option("truncate", "true")//先删
.mode("overwrite")
.format("parquet")
.option("batchsize",1000) //批次写入调优
.jdbc(url "databases.table", props)