DeltaControl

DeltaControl is a Python class that defines ways to handle null values during a delta UpdateByOperation. delta calculates the difference between the current row and the previous row.

Syntax

Parameters

ParameterTypeDescription
valueEnum

Defines how special cases should behave. Enum options are:

  • DeltaControl.NULL_DOMINATES: A valid value following a null value returns null.
  • DeltaControl.VALUE_DOMINATES: A valid value following a null value returns the valid value.
  • DeltaControl.ZERO_DOMINATES: A valid value following a null value returns zero.

Returns

An instance of a DeltaControl class that can be used in an update_by delta operation.

Examples

The following example creates a table with three rows of int columns. Next, it creates three DeltaControl objects by calling its constructor. Finally, it uses update_by and invokes the delta UpdateByOperation to demonstrate how the three Enum values for DeltaControl affect the output.