[stats wf] indicators across stats dbs & updates in the org ids #248

Closed
dimitris.pierrakos wants to merge 1742 commits from beta into beta2master_sept_2022
2 changed files with 19 additions and 0 deletions
Showing only changes of commit b195da3a83 - Show all commits

View File

@ -0,0 +1,3 @@
package eu.dnetlib.dhp.application.dedup.log
case class DedupLogModel(tag:String, configuration:String, entity:String, startTS:Long, endTS:Long, totalMs:Long ) {}

View File

@ -0,0 +1,16 @@
package eu.dnetlib.dhp.application.dedup.log
import org.apache.spark.sql.{SaveMode, SparkSession}
class DedupLogWriter (path:String) {
def appendLog(dedupLogModel: DedupLogModel, spark:SparkSession): Unit = {
import spark.implicits._
val df = spark.createDataset[DedupLogModel](data = List(dedupLogModel))
df.write.mode(SaveMode.Append).save(path)
}
}