MergeIntoWriter

org.apache.spark.sql.MergeIntoWriter
class MergeIntoWriter[T]

Builder for a MERGE INTO statement, obtained from Dataset.mergeInto. Specify one or more whenMatched / whenNotMatched / whenNotMatchedBySource clauses, then call merge to execute the statement against the target table.

 spark.table("source")
   .mergeInto("target", col("source.id") === col("target.id"))
   .whenMatched().updateAll()
   .whenNotMatched().insertAll()
   .whenNotMatchedBySource().delete()
   .merge()

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def merge(): Unit

Executes the merge against the target table.

Executes the merge against the target table.

Attributes

Initiates a WHEN MATCHED clause without an extra condition.

Initiates a WHEN MATCHED clause without an extra condition.

Attributes

def whenMatched(condition: Column): WhenMatched[T]

Initiates a WHEN MATCHED AND <condition> clause.

Initiates a WHEN MATCHED AND <condition> clause.

Attributes

Initiates a WHEN NOT MATCHED clause without an extra condition.

Initiates a WHEN NOT MATCHED clause without an extra condition.

Attributes

def whenNotMatched(condition: Column): WhenNotMatched[T]

Initiates a WHEN NOT MATCHED AND <condition> clause.

Initiates a WHEN NOT MATCHED AND <condition> clause.

Attributes

Initiates a WHEN NOT MATCHED BY SOURCE clause without an extra condition.

Initiates a WHEN NOT MATCHED BY SOURCE clause without an extra condition.

Attributes

Initiates a WHEN NOT MATCHED BY SOURCE AND <condition> clause.

Initiates a WHEN NOT MATCHED BY SOURCE AND <condition> clause.

Attributes

Enables automatic schema evolution for this merge.

Enables automatic schema evolution for this merge.

Attributes