abstract class MergeIntoWriter[T] extends AnyRef
MergeIntoWriter provides methods to define and execute merge actions based on specified
conditions.
Please note that schema evolution is disabled by default.
- T
 the type of data in the Dataset.
- Annotations
 - @Experimental()
 - Source
 - MergeIntoWriter.scala
 - Since
 4.0.0
- Alphabetic
 - By Inheritance
 
- MergeIntoWriter
 - AnyRef
 - Any
 
- Hide All
 - Show All
 
- Public
 - Protected
 
Instance Constructors
-  new MergeIntoWriter()
 
Abstract Value Members
-   abstract  def delete(condition: Option[Column], notMatchedBySource: Boolean): MergeIntoWriter[T]
- Attributes
 - protected[sql]
 
 -   abstract  def insert(condition: Option[Column], map: Map[String, Column]): MergeIntoWriter[T]
- Attributes
 - protected[sql]
 
 -   abstract  def insertAll(condition: Option[Column]): MergeIntoWriter[T]
- Attributes
 - protected[sql]
 
 -   abstract  def merge(): Unit
Executes the merge operation.
 -   abstract  def update(condition: Option[Column], map: Map[String, Column], notMatchedBySource: Boolean): MergeIntoWriter[T]
- Attributes
 - protected[sql]
 
 -   abstract  def updateAll(condition: Option[Column], notMatchedBySource: Boolean): MergeIntoWriter[T]
- Attributes
 - protected[sql]
 
 
Concrete 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 clone(): AnyRef
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
 
 -   final  def eq(arg0: AnyRef): Boolean
- Definition Classes
 - AnyRef
 
 -    def equals(arg0: AnyRef): Boolean
- Definition Classes
 - AnyRef → Any
 
 -   final  def getClass(): Class[_ <: AnyRef]
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @IntrinsicCandidate() @native()
 
 -    def hashCode(): Int
- Definition Classes
 - AnyRef → Any
 - Annotations
 - @IntrinsicCandidate() @native()
 
 -   final  def isInstanceOf[T0]: Boolean
- Definition Classes
 - Any
 
 -   final  def ne(arg0: AnyRef): Boolean
- Definition Classes
 - AnyRef
 
 -   final  def notify(): Unit
- Definition Classes
 - AnyRef
 - Annotations
 - @IntrinsicCandidate() @native()
 
 -   final  def notifyAll(): Unit
- Definition Classes
 - AnyRef
 - Annotations
 - @IntrinsicCandidate() @native()
 
 -   final  def synchronized[T0](arg0: => T0): T0
- Definition Classes
 - AnyRef
 
 -    def toString(): String
- Definition Classes
 - AnyRef → Any
 
 -   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()
 
 -   final  def wait(): Unit
- Definition Classes
 - AnyRef
 - Annotations
 - @throws(classOf[java.lang.InterruptedException])
 
 -    def whenMatched(condition: Column): WhenMatched[T]
Initialize a
WhenMatchedaction with a condition.Initialize a
WhenMatchedaction with a condition.This
WhenMatchedaction will be executed when a source row matches a target table row based on the merge condition and the specifiedconditionis satisfied.This
WhenMatchedcan be followed by one of the following merge actions:updateAll: Update all the matched target table rows with source dataset rows.update(Map): Update all the matched target table rows while changing only a subset of columns based on the provided assignment.delete: Delete all target rows that have a match in the source table.
- condition
 a
Columnrepresenting the condition to be evaluated for the action.- returns
 a new
WhenMatchedobject configured with the specified condition.
 -    def whenMatched(): WhenMatched[T]
Initialize a
WhenMatchedaction without any condition.Initialize a
WhenMatchedaction without any condition.This
WhenMatchedaction will be executed when a source row matches a target table row based on the merge condition.This
WhenMatchedcan be followed by one of the following merge actions:updateAll: Update all the matched target table rows with source dataset rows.update(Map): Update all the matched target table rows while changing only a subset of columns based on the provided assignment.delete: Delete all target rows that have a match in the source table.
- returns
 a new
WhenMatchedobject.
 -    def whenNotMatched(condition: Column): WhenNotMatched[T]
Initialize a
WhenNotMatchedaction with a condition.Initialize a
WhenNotMatchedaction with a condition.This
WhenNotMatchedaction will be executed when a source row does not match any target row based on the merge condition and the specifiedconditionis satisfied.This
WhenNotMatchedcan be followed by one of the following merge actions:insertAll: Insert all rows from the source that are not already in the target table.insert(Map): Insert all rows from the source that are not already in the target table, with the specified columns based on the provided assignment.
- condition
 a
Columnrepresenting the condition to be evaluated for the action.- returns
 a new
WhenNotMatchedobject configured with the specified condition.
 -    def whenNotMatched(): WhenNotMatched[T]
Initialize a
WhenNotMatchedaction without any condition.Initialize a
WhenNotMatchedaction without any condition.This
WhenNotMatchedaction will be executed when a source row does not match any target row based on the merge condition.This
WhenNotMatchedcan be followed by one of the following merge actions:insertAll: Insert all rows from the source that are not already in the target table.insert(Map): Insert all rows from the source that are not already in the target table, with the specified columns based on the provided assignment.
- returns
 a new
WhenNotMatchedobject.
 -    def whenNotMatchedBySource(condition: Column): WhenNotMatchedBySource[T]
Initialize a
WhenNotMatchedBySourceaction with a condition.Initialize a
WhenNotMatchedBySourceaction with a condition.This
WhenNotMatchedBySourceaction will be executed when a target row does not match any rows in the source table based on the merge condition and the specifiedconditionis satisfied.This
WhenNotMatchedBySourcecan be followed by one of the following merge actions:updateAll: Update all the not matched target table rows with source dataset rows.update(Map): Update all the not matched target table rows while changing only the specified columns based on the provided assignment.delete: Delete all target rows that have no matches in the source table.
- condition
 a
Columnrepresenting the condition to be evaluated for the action.- returns
 a new
WhenNotMatchedBySourceobject configured with the specified condition.
 -    def whenNotMatchedBySource(): WhenNotMatchedBySource[T]
Initialize a
WhenNotMatchedBySourceaction without any condition.Initialize a
WhenNotMatchedBySourceaction without any condition.This
WhenNotMatchedBySourceaction will be executed when a target row does not match any rows in the source table based on the merge condition.This
WhenNotMatchedBySourcecan be followed by one of the following merge actions:updateAll: Update all the not matched target table rows with source dataset rows.update(Map): Update all the not matched target table rows while changing only the specified columns based on the provided assignment.delete: Delete all target rows that have no matches in the source table.
- returns
 a new
WhenNotMatchedBySourceobject.
 -    def withSchemaEvolution(): MergeIntoWriter[T]
Enable automatic schema evolution for this merge operation.
Enable automatic schema evolution for this merge operation.
- returns
 A
MergeIntoWriterinstance with schema evolution enabled.
 
Deprecated Value Members
-    def finalize(): Unit
- Attributes
 - protected[lang]
 - Definition Classes
 - AnyRef
 - Annotations
 - @throws(classOf[java.lang.Throwable]) @Deprecated
 - Deprecated
 (Since version 9)