Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#369 Fix lazy created lazy if they depend on transient tables. #370

Merged
merged 1 commit into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package za.co.absa.pramen.core.pipeline
import com.typesafe.config.Config
import org.apache.spark.sql.SparkSession
import org.slf4j.LoggerFactory
import za.co.absa.pramen.api.Transformer
import za.co.absa.pramen.api.{DataFormat, Transformer}
import za.co.absa.pramen.core.app.config.GeneralConfig.TEMPORARY_DIRECTORY_KEY
import za.co.absa.pramen.core.bookkeeper.Bookkeeper
import za.co.absa.pramen.core.config.Keys.SPECIAL_CHARACTERS_IN_COLUMN_NAMES
Expand Down Expand Up @@ -151,7 +151,7 @@ class OperationSplitter(conf: Config,

val outputTableName = sinkTable.outputTableName.getOrElse(s"${sinkTable.metaTableName}->$sinkName")

val outputTable = inputTable.copy(name = outputTableName, hiveTable = None)
val outputTable = inputTable.copy(name = outputTableName, format = DataFormat.Null(), hiveTable = None)

val notificationTargets = operationDef.notificationTargets
.map(targetName => getNotificationTarget(conf, targetName, sinkTable.conf))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package za.co.absa.pramen.core.pipeline

import com.typesafe.config.{Config, ConfigFactory}
import org.scalatest.wordspec.AnyWordSpec
import za.co.absa.pramen.api.DataFormat
import za.co.absa.pramen.core.OperationDefFactory
import za.co.absa.pramen.core.base.SparkTestBase
import za.co.absa.pramen.core.databricks.DatabricksClient
Expand Down Expand Up @@ -221,7 +222,9 @@ class OperationSplitterSuite extends AnyWordSpec with SparkTestBase {

assert(job.length == 2)
assert(job.head.isInstanceOf[SinkJob])
assert(job.head.asInstanceOf[SinkJob].outputTable.format.isInstanceOf[DataFormat.Null])
assert(job(1).isInstanceOf[SinkJob])
assert(job(1).asInstanceOf[SinkJob].outputTable.format.isInstanceOf[DataFormat.Null])
}

"create transfer jobs" in {
Expand Down
Loading