Number
Number transforms operate on number data.
number.maximum
Selects the larger of two numbers.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
value | float64 | Value (max) that is evaluated with the data. Defaults to 0 . | No. |
Example
sub.transform.number.maximum(
settings={object: {source_key: 'max', target_key: 'max'}, value: 10}
)
sub.tf.num.max({obj: {src: 'max', trg: 'max'}, value: 10})
number.minimum
Selects the smaller of two numbers.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
value | float64 | Value (min) that is evaluated with the data. Defaults to 0 . | No. |
Example
sub.transform.number.minimum(
settings={object: {source_key: 'min', target_key: 'min'}, value: 10}
)
sub.tf.num.min({obj: {src: 'min', trg: 'min'}, value: 10})
number.math.addition
Sums (adds) all values in a JSON array.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
Example
sub.transform.number.math.addition(
settings={object: {source_key: 'num', target_key: 'sum'}}
)
sub.tf.num.math.add({obj: {src: 'num', trg: 'sum'}})
number.math.subtraction
Subtracts all values in a JSON array.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
Example
sub.transform.number.math.subtraction(
settings={object: {source_key: 'num', target_key: 'sub'}}
)
sub.tf.num.math.sub({obj: {src: 'num', trg: 'sub'}})
number.math.multiplication
Multiplies all values in a JSON array.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
Example
sub.transform.number.math.multiplication(
settings={object: {source_key: 'num', target_key: 'mul'}}
)
sub.tf.num.math.mul({obj: {src: 'num', trg: 'mul'}})
number.math.division
Divides all values in a JSON array.
Settings
Field | Type | Description | Required |
---|---|---|---|
object.source_key | string | Retrieves a value from an object for transformation. | No |
object.target_key | string | Places a value into an object after transformation. | No |
Example
sub.transform.number.math.division(
settings={object: {source_key: 'num', trg: 'div'}}
)
sub.tf.num.math.div({obj: {src: 'num', dst: 'div'}})
Updated 4 months ago