All Downloads are FREE. Search and download functionalities are using the official Maven repository.

icu.wuhufly.dws.machine_produce_per_avgtime04.scala Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy