Skip to content

Commit c1da600

Browse files
committed
#660 Make spark-avro dependency provided because it is tightly coupled with Spark version.
1 parent ec71a1d commit c1da600

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pramen/api/src/main/scala/za/co/absa/pramen/api/Source.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ trait Source extends ExternalChannel {
112112
def getDataIncremental(query: Query, onlyForInfoDate: Option[LocalDate], offsetFromOpt: Option[OffsetValue], offsetToOpt: Option[OffsetValue], columns: Seq[String]): SourceResult
113113

114114
/**
115-
* This method is called after the ingestion is finished. You can query the output table form the output information
115+
* This method is called after the ingestion is finished. You can query the output table from the output information
116116
* data and the data should be there.
117117
*
118118
* @param query The query used to read the data from the source.

pramen/core/src/main/scala/za/co/absa/pramen/core/runner/task/TaskRunnerBase.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ abstract class TaskRunnerBase(conf: Config,
365365
case None => runResult.data
366366
}
367367

368-
val dfWithInfoDate = if (dfWithTimestamp.schema.exists(f => f.name.equals(task.job.outputTable.infoDateColumn)) || task.job.outputTable.infoDateColumn.isEmpty) {
368+
val dfWithInfoDate = if (task.job.outputTable.infoDateColumn.isEmpty) {
369369
dfWithTimestamp
370370
} else {
371371
dfWithTimestamp.withColumn(task.job.outputTable.infoDateColumn, lit(Date.valueOf(task.infoDate)))

pramen/project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ object Dependencies {
4646

4747
def ExtrasJobsDependencies(scalaVersion: String): Seq[ModuleID] = Seq(
4848
"org.apache.spark" %% "spark-sql" % sparkVersion(scalaVersion) % Provided,
49+
"org.apache.spark" %% "spark-avro" % sparkVersion(scalaVersion) % Provided,
4950
"net.sourceforge.jtds" % "jtds" % msSqlDriverVersion,
5051
"org.apache.httpcomponents" % "httpclient" % httpClientVersion,
51-
"org.apache.spark" %% "spark-avro" % sparkVersion(scalaVersion),
5252
"org.scalatest" %% "scalatest" % scalatestVersion % Test,
5353
"org.mockito" % "mockito-core" % mockitoVersion % Test,
5454
"org.hsqldb" % "hsqldb" % hsqlDbVersion % Test classifier "jdk8"

0 commit comments

Comments
 (0)