Number
Number transforms operate on number data.
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 10 months ago