Skip to main content
Version: Next

RandomNumeric

Generate a random numeric within the provided interval.

Parameters

NameDescriptionDefaultRequiredSupported DB types
columnThe name of the column to be affectedYesnumeric, decimal
minThe minimum threshold for the random value. The value range depends on the column type.Yes-
maxThe maximum threshold for the random value. The value range depends on the column type.Yes-
decimalThe decimal of the random numeric value (number of digits after the decimal point)4No-
keep_nullIndicates whether NULL values should be replaced with transformed values or nottrueNo-
engineThe engine used for generating the values [random, hash]. Use hash for deterministic generationrandomNo-

Dynamic parameters

ParameterSupported types
minint2, int4, int8, float4, float8, numeric, decimal
maxint2, int4, int8, float4, float8, numeric, decimal

Description

The RandomNumeric transformer generates a random numeric value within the provided interval, starting from min to max, with the option to specify the number of decimal digits by using the decimal parameter. The behaviour for NULL values can be configured using the keep_null parameter.

The engine parameter allows you to choose between random and hash engines for generating values. Read more about the engines in the Transformation engines section.

Example: Generate random price

In this example, the RandomNumeric transformer generates random prices in the range from 0.1 to 7000 while maintaining a decimal of up to 2 digits.

RandomNumeric transformer example
- schema: "sales"
name: "salesorderdetail"
transformers:
- name: "RandomNumeric"
params:
column: "unitprice"
min: 0.1
max: 7000
decimal: 2
  1. The type overrides applied for example because the playground database does not contain any tables with numeric columns.

Result:

ColumnOriginalValueTransformedValue
unitprice2024.9944449.7
Copyright © GreenMask 2026