Skip to content

SetTransaction

SetTransaction is an Action defined by the following properties:

  • Application ID (i.e. streaming query ID)
  • Version (i.e. micro-batch ID)
  • Last Updated (optional) (i.e. milliseconds since the epoch)

SetTransaction is created when:

Demo

val path = "/tmp/delta/users"

import org.apache.spark.sql.delta.DeltaLog
val deltaLog = DeltaLog.forTable(spark, path)

import org.apache.spark.sql.delta.actions.SetTransaction
assert(deltaLog.snapshot.setTransactions.isInstanceOf[Seq[SetTransaction]])

deltaLog.snapshot.setTransactions