case class SaveModeMergeOptions(deleteCondition: Option[String] = None, updateCondition: Option[String] = None, updateColumns: Seq[String] = Seq(), insertCondition: Option[String] = None, insertColumnsToIgnore: Seq[String] = Seq(), additionalMergePredicate: Option[String] = None) extends SaveModeOptions with Product with Serializable
Options to control detailed behaviour of SaveMode.Merge. In Spark expressions use table alias 'existing' to reference columns of the existing table data, and table alias 'new' to reference columns of new data set.
- deleteCondition
A condition to control if matched records are deleted. If no condition is given, *no* records are delete.
- updateCondition
A condition to control if matched records are updated. If no condition is given all matched records are updated (default). Note that delete is applied before update. Records selected for deletion are automatically excluded from the updates.
- updateColumns
List of column names to update in update clause. If empty all columns (except primary keys) are updated (default)
- insertCondition
A condition to control if unmatched records are inserted. If no condition is given all unmatched records are inserted (default).
- insertColumnsToIgnore
List of column names to ignore in insert clause. If empty all columns are inserted (default).
- additionalMergePredicate
To optimize performance for SDLSaveMode.Merge it might be interesting to limit the records read from the existing table data, e.g. merge operation might use only the last 7 days.
- Annotations
- @Scaladoc()
- Alphabetic
- By Inheritance
- SaveModeMergeOptions
- Serializable
- Serializable
- Product
- Equals
- SaveModeOptions
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
SaveModeMergeOptions(deleteCondition: Option[String] = None, updateCondition: Option[String] = None, updateColumns: Seq[String] = Seq(), insertCondition: Option[String] = None, insertColumnsToIgnore: Seq[String] = Seq(), additionalMergePredicate: Option[String] = None)
- deleteCondition
A condition to control if matched records are deleted. If no condition is given, *no* records are delete.
- updateCondition
A condition to control if matched records are updated. If no condition is given all matched records are updated (default). Note that delete is applied before update. Records selected for deletion are automatically excluded from the updates.
- updateColumns
List of column names to update in update clause. If empty all columns (except primary keys) are updated (default)
- insertCondition
A condition to control if unmatched records are inserted. If no condition is given all unmatched records are inserted (default).
- insertColumnsToIgnore
List of column names to ignore in insert clause. If empty all columns are inserted (default).
- additionalMergePredicate
To optimize performance for SDLSaveMode.Merge it might be interesting to limit the records read from the existing table data, e.g. merge operation might use only the last 7 days.
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
- val additionalMergePredicate: Option[String]
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @HotSpotIntrinsicCandidate()
- val deleteCondition: Option[String]
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- val insertColumnsToIgnore: Seq[String]
- val insertCondition: Option[String]
-
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
- @native() @HotSpotIntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
- val updateColumns: Seq[String]
- val updateCondition: Option[String]
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated