SCALE THE VALUES FOR KEYVALUE¶
Applies a linear scale-and-offset transformation to all numeric values in a key-value pair collection, producing a new key-value output. Use this worker to convert units or normalize scalar responses inline within a workflow (result = value × scale + offset).
When to use¶
Classification: process.
Tagged: keyvalue, linear_transform, offset, scalar, scale, unit_conversion.
Inputs¶
| Label | ID | Type | Default | Required | Description |
|---|---|---|---|---|---|
| Response To Extract From | responsetoextractfrom | keyvalue | — | Input key-value pair collection whose numeric values will be scaled and offset; accepts any keyvalue response object from an upstream extraction or response worker. | |
| Scale | scale | scalar | 1.0 | Multiplicative scale factor applied to each value (dimensionless); default is 1.0 (no scaling). | |
| Offset | offset | scalar | 0.0 | Additive offset applied to each value after scaling (same units as the scaled result); default is 0.0 (no offset). | |
| Format | format | scalar | %s | Printf-style format string controlling how transformed values are serialized (e.g. ‘%.3f’ for 3 decimal places); default ‘%s’ preserves the value as-is. |
Outputs¶
| Label | ID | Type | Description |
|---|---|---|---|
| keyvalue_scale_offset_output_1 | keyvalue_scale_offset_output_1 | keyvalue | Key-value pair collection containing the same keys as the input but with each numeric value replaced by (value × scale + offset). |
Disciplines¶
- data.curve.transform
- data.units
Runnable example¶
A runnable example is registered for this worker. Open the example workflow on the d3VIEW canvas: /api/workflow/example?id=keyvalue_scale_offset
Auto-generated from transformation schema. Worker id: keyvalue_scale_offset. Schema hash: a6278231a2cc. Hand-curated docs in workerexamples/ override this page when present.