From a4eb13cf387c454b1854d9929e04474939257306 Mon Sep 17 00:00:00 2001 From: Noah Prince <83885631+ChewingGlass@users.noreply.github.com> Date: Mon, 8 Jan 2024 11:52:14 -0500 Subject: [PATCH] Add startingTimestamp option (#22) * Add startingTimestamp option * Bump ver --- spark-streaming-sql/build.sbt | 2 +- spark-streaming-sql/src/main/scala/Main.scala | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/spark-streaming-sql/build.sbt b/spark-streaming-sql/build.sbt index a244e93..6d2dd5b 100644 --- a/spark-streaming-sql/build.sbt +++ b/spark-streaming-sql/build.sbt @@ -1,7 +1,7 @@ scalaVersion := "2.13.8" name := "spark-streaming-sql" organization := "helium" -version := "1.0.2" +version := "1.0.3" val sparkVersion = "3.4.0" diff --git a/spark-streaming-sql/src/main/scala/Main.scala b/spark-streaming-sql/src/main/scala/Main.scala index f4c54b2..8b51051 100644 --- a/spark-streaming-sql/src/main/scala/Main.scala +++ b/spark-streaming-sql/src/main/scala/Main.scala @@ -72,6 +72,7 @@ object Main extends App { .outputMode("append") .partitionBy(sys.env.get("PARTITION_BY").get.split(","): _*) .option("checkpointLocation", sys.env.get("CHECKPOINT").get) + .option("startingTimestamp", sys.env.getOrElse("STARTING_TIMESTAMP", "2017-01-01")) .trigger(trigger) .start(sys.env.get("OUTPUT").get) .awaitTermination()