icu.wuhufly.dws.machine_produce_per_avgtime04.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of shtd-bd Show documentation
Show all versions of shtd-bd Show documentation
bigdata source code for shtd
The newest version!
package icu.wuhufly.dws
import icu.wuhufly.utils.{CreateUtils, WriteUtils}
import org.apache.spark.SparkContext
import org.apache.spark.sql.{DataFrame, SparkSession}
object machine_produce_per_avgtime04 {
def main(args: Array[String]): Unit = {
val spark: SparkSession = CreateUtils.getSpark()
val sc: SparkContext = spark.sparkContext
spark.sql("use dws")
val df: DataFrame = spark.sql("select * from dws.machine_produce_per_avgtime where producetime > produce_per_avgtime")
WriteUtils.writeToCK(
"machine_produce_per_avgtime", df, "produce_record_id"
)
sc.stop()
}
}