Class WhenNotMatched<T>

Object
org.apache.spark.sql.WhenNotMatched<T>
Type Parameters:
T - The type of data in the MergeIntoWriter.
All Implemented Interfaces:
Serializable, scala.Equals, scala.Product

public class WhenNotMatched<T> extends Object implements scala.Product, Serializable
A class for defining actions to be taken when no matching rows are found in a DataFrame during a merge operation.

param: MergeIntoWriter The MergeIntoWriter instance responsible for writing data to a target DataFrame. param: condition An optional condition Expression that specifies when the actions defined in this configuration should be applied. If the condition is None, the actions will be applied when there are no matching rows.

See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    scala.Option<org.apache.spark.sql.catalyst.expressions.Expression>
     
    insert(scala.collection.immutable.Map<String,Column> map)
    Specifies an action to insert non-matched rows into the DataFrame with the provided column assignments.
    Specifies an action to insert all non-matched rows into the DataFrame.
     

    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()
    • insertAll

      public MergeIntoWriter<T> insertAll()
      Specifies an action to insert all non-matched rows into the DataFrame.

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

      public MergeIntoWriter<T> insert(scala.collection.immutable.Map<String,Column> map)
      Specifies an action to insert non-matched rows into the DataFrame with the provided column assignments.

      Parameters:
      map - A Map of column names to Column expressions representing the values to be inserted.
      Returns:
      The MergeIntoWriter instance with the insert action configured.