Skip to content



Scales the values of a numerical column to lie between a specified minimum and maximum.

Without further specification, the minimum and maximum by default are 0.0 and 1.0 respectively.


The following example scales input values to be in the range [0, 1].

scale(ds.input) -> (ds.scaled)
More examples

Using a custom configuration to scale values to the interval [-2, 2], rather than the default of [0, 1]:

scale(ds.input, {
  "min": -2,
  "max": 2,
}) -> (ds.scaled)


The following are the step's expected inputs and outputs and their specific types.

scale(input: number, {"param": value}) -> (output: number)

where the object {"param": value} is optional in most cases and if present may contain any of the parameters described in the corresponding section below.


input: column:number

A numeric input column.


output: column:number

A numeric column containing the scaled values.


min: number = 0.0

The minimum value after scaling.

max: number = 1.0

The maximum value after scaling.