Class WhenNotMatchedBySource<T>

Object
org.apache.spark.sql.WhenNotMatchedBySource<T>
Type Parameters:
T - the type parameter for the MergeIntoWriter.
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class WhenNotMatchedBySource<T> extends Object implements scala.Product, Serializable
A class for defining actions to be performed when there is no match by source during a merge operation in a MergeIntoWriter.

param: MergeIntoWriter the MergeIntoWriter instance to which the merge actions will be applied. param: condition an optional condition to be used with the merge actions.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    scala.Option<org.apache.spark.sql.catalyst.expressions.Expression>
     
    Specifies an action to delete non-matched rows from the target DataFrame when not matched by the source.
     
    update(scala.collection.immutable.Map<String,Column> map)
    Specifies an action to update non-matched rows in the target DataFrame with the provided column assignments when not matched by the source.
    Specifies an action to update all non-matched rows in the target DataFrame when not matched by the source.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface scala.Equals

    canEqual, equals

    Methods inherited from interface scala.Product

    productArity, productElement, productElementName, productElementNames, productIterator, productPrefix
  • Method Details

    • mergeIntoWriter

      public MergeIntoWriter<T> mergeIntoWriter()
    • condition

      public scala.Option<org.apache.spark.sql.catalyst.expressions.Expression> condition()
    • updateAll

      public MergeIntoWriter<T> updateAll()
      Specifies an action to update all non-matched rows in the target DataFrame when not matched by the source.

      Returns:
      The MergeIntoWriter instance with the update all action configured.
    • update

      public MergeIntoWriter<T> update(scala.collection.immutable.Map<String,Column> map)
      Specifies an action to update non-matched rows in the target DataFrame with the provided column assignments when not matched by the source.

      Parameters:
      map - A Map of column names to Column expressions representing the updates to be applied.
      Returns:
      The MergeIntoWriter instance with the update action configured.
    • delete

      public MergeIntoWriter<T> delete()
      Specifies an action to delete non-matched rows from the target DataFrame when not matched by the source.

      Returns:
      The MergeIntoWriter instance with the delete action configured.