case class DeltaTableV2(spark: SparkSession, path: Path, catalogTable: Option[CatalogTable] = None, tableIdentifier: Option[String] = None, timeTravelOpt: Option[DeltaTimeTravelSpec] = None, options: Map[String, String] = Map.empty) extends Table with SupportsWrite with V2TableWithV1Fallback with DeltaLogging with Product with Serializable
The data source V2 representation of a Delta table that exists.
- path
The path to the table
- tableIdentifier
The table identifier for this table
- Alphabetic
- By Inheritance
- DeltaTableV2
- Serializable
- Product
- Equals
- DeltaLogging
- DatabricksLogging
- DeltaProgressReporter
- Logging
- V2TableWithV1Fallback
- SupportsWrite
- Table
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new DeltaTableV2(spark: SparkSession, path: Path, catalogTable: Option[CatalogTable] = None, tableIdentifier: Option[String] = None, timeTravelOpt: Option[DeltaTimeTravelSpec] = None, options: Map[String, String] = Map.empty)
- path
The path to the table
- tableIdentifier
The table identifier for this table
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def capabilities(): Set[TableCapability]
- Definition Classes
- DeltaTableV2 → Table
- val catalogTable: Option[CatalogTable]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def columns(): Array[connector.catalog.Column]
- Definition Classes
- Table
- def deltaAssert(check: => Boolean, name: String, msg: String, deltaLog: DeltaLog = null, data: AnyRef = null, path: Option[Path] = None): Unit
Helper method to check invariants in Delta code.
Helper method to check invariants in Delta code. Fails when running in tests, records a delta assertion event and logs a warning otherwise.
- Attributes
- protected
- Definition Classes
- DeltaLogging
- lazy val deltaLog: DeltaLog
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def getCommonTags(deltaLog: DeltaLog, tahoeId: String): Map[TagDefinition, String]
- Definition Classes
- DeltaLogging
- def getErrorData(e: Throwable): Map[String, Any]
- Definition Classes
- DeltaLogging
- def getTableIdentifierIfExists: Option[TableIdentifier]
- def hasPartitionFilters: Boolean
- lazy val initialSnapshot: Snapshot
The snapshot initially associated with this table.
The snapshot initially associated with this table. It is captured on first access, usually (but not always) shortly after the table was first created, and is immutable once captured.
WARNING: This snapshot could be arbitrarily stale for long-lived DeltaTableV2 instances, such as the ones DeltaTable uses internally. Callers who cannot tolerate this potential staleness should use getFreshSnapshot instead.
WARNING: Because the snapshot is captured lazily, callers should explicitly access the snapshot if they want to be certain it has been captured.
- def initializeLogIfNecessary(isInterpreter: Boolean, silent: Boolean): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def initializeLogIfNecessary(isInterpreter: Boolean): Unit
- Attributes
- protected
- Definition Classes
- Logging
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def isTraceEnabled(): Boolean
- Attributes
- protected
- Definition Classes
- Logging
- def log: Logger
- Attributes
- protected
- Definition Classes
- Logging
- def logConsole(line: String): Unit
- Definition Classes
- DatabricksLogging
- def logDebug(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logDebug(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logError(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logInfo(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logName: String
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logTrace(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String, throwable: Throwable): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def logWarning(msg: => String): Unit
- Attributes
- protected
- Definition Classes
- Logging
- def name(): String
- Definition Classes
- DeltaTableV2 → Table
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def newWriteBuilder(info: LogicalWriteInfo): WriteBuilder
- Definition Classes
- DeltaTableV2 → SupportsWrite
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val options: Map[String, String]
- def partitioning(): Array[Transform]
- Definition Classes
- DeltaTableV2 → Table
- val path: Path
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def properties(): Map[String, String]
- Definition Classes
- DeltaTableV2 → Table
- def recordDeltaEvent(deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty, data: AnyRef = null, path: Option[Path] = None): Unit
Used to record the occurrence of a single event or report detailed, operation specific statistics.
Used to record the occurrence of a single event or report detailed, operation specific statistics.
- path
Used to log the path of the delta table when
deltaLogis null.
- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordDeltaOperation[A](deltaLog: DeltaLog, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A
Used to report the duration as well as the success or failure of an operation on a
deltaLog.Used to report the duration as well as the success or failure of an operation on a
deltaLog.- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordDeltaOperationForTablePath[A](tablePath: String, opType: String, tags: Map[TagDefinition, String] = Map.empty)(thunk: => A): A
Used to report the duration as well as the success or failure of an operation on a
tahoePath.Used to report the duration as well as the success or failure of an operation on a
tahoePath.- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordEvent(metric: MetricDefinition, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
- Definition Classes
- DatabricksLogging
- def recordFrameProfile[T](group: String, name: String)(thunk: => T): T
- Attributes
- protected
- Definition Classes
- DeltaLogging
- def recordOperation[S](opType: OpType, opTarget: String = null, extraTags: Map[TagDefinition, String], isSynchronous: Boolean = true, alwaysRecordStats: Boolean = false, allowAuthTags: Boolean = false, killJvmIfStuck: Boolean = false, outputMetric: MetricDefinition = METRIC_OPERATION_DURATION, silent: Boolean = true)(thunk: => S): S
- Definition Classes
- DatabricksLogging
- def recordProductEvent(metric: MetricDefinition with CentralizableMetric, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, trimBlob: Boolean = true): Unit
- Definition Classes
- DatabricksLogging
- def recordProductUsage(metric: MetricDefinition with CentralizableMetric, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
- Definition Classes
- DatabricksLogging
- def recordUsage(metric: MetricDefinition, quantity: Double, additionalTags: Map[TagDefinition, String] = Map.empty, blob: String = null, forceSample: Boolean = false, trimBlob: Boolean = true, silent: Boolean = false): Unit
- Definition Classes
- DatabricksLogging
- def schema(): StructType
- Definition Classes
- DeltaTableV2 → Table
- val spark: SparkSession
- def startTransaction(snapshotOpt: Option[Snapshot] = None): OptimisticTransaction
Starts a transaction for this table, using Some provided snapshot, or a fresh snapshot if None was provided.
- def startTransactionWithInitialSnapshot(): OptimisticTransaction
Starts a transaction for this table, using the snapshot captured during table resolution.
Starts a transaction for this table, using the snapshot captured during table resolution.
WARNING: Caller is responsible to ensure that table resolution was recent (e.g. if working with DataFrame or DeltaTable API, where the table could have been resolved long ago).
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tableExists: Boolean
- val tableIdentifier: Option[String]
- val timeTravelOpt: Option[DeltaTimeTravelSpec]
- lazy val toBaseRelation: BaseRelation
Creates a V1 BaseRelation from this Table to allow read APIs to go through V1 DataSource code paths.
- def toDf(sparkSession: SparkSession): DataFrame
Creates a DataFrame that uses the requested spark session to read from this table
- lazy val toDf: DataFrame
Creates a DataFrame that reads from this table
- lazy val toLogicalRelation: LogicalRelation
Creates a LogicalRelation that represents this table
- lazy val ttSafeCatalogTable: Option[CatalogTable]
A "clean" version of the catalog table, safe for use with or without time travel.
- def v1Table: CatalogTable
- Definition Classes
- DeltaTableV2 → V2TableWithV1Fallback
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- def withOptions(newOptions: Map[String, String]): DeltaTableV2
Check the passed in options and existing timeTravelOpt, set new time travel by options.
- def withStatusCode[T](statusCode: String, defaultMessage: String, data: Map[String, Any] = Map.empty)(body: => T): T
Report a log to indicate some command is running.
Report a log to indicate some command is running.
- Definition Classes
- DeltaProgressReporter