Skip to main content
Version: Next

NoiseFloat

Add or subtract a random fraction to the original float value.

Parameters

NameDescriptionDefaultRequiredSupported DB types
columnThe name of the column to be affectedYesfloat4, float8
decimalThe decimal of the noised float value (number of digits after the decimal point)4No-
min_ratioThe minimum random percentage for noise, from 0 to 1, e. g. 0.1 means "add noise up to 10%"0.05No-
max_ratioThe maximum random percentage for noise, from 0 to 1, e. g. 0.1 means "add noise up to 10%"Yes-
minMin threshold of noised valueNo-
maxMax threshold of noised valueNo-
engineThe engine used for generating the values [random, hash]. Use hash for deterministic generationrandomNo-

Dynamic parameters

ParameterSupported types
minfloat4, float8, int2, int4, int8
maxfloat4, float8, int2, int4, int8

Description

The NoiseFloat transformer multiplies the original float value by randomly generated value that is not higher than the max_ratio parameter and not less that max_ratio parameter and adds it to or subtracts it from the original value. Additionally, you can specify the number of decimal digits by using the decimal parameter.

In case you have constraints on the float range, you can set the min and max parameters to specify the threshold values. The values for min and max must have the same format as the column parameter. Parameters min and max support dynamic mode. Engine parameter allows you to choose between random and hash engines for generating values. Read more about the engines

info

If the noised value exceeds the max threshold, the transformer will set the value to max. If the noised value is lower than the min threshold, the transformer will set the value to min.

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: Adding noise to the purchase price

In this example, the original value of standardprice will be noised up to 50% and rounded up to 2 decimals.

NoiseFloat transformer example
- schema: "purchasing"
name: "productvendor"
columns_type_override: # (1)
lastreceiptcost: "float8"
standardprice: "float8"
transformers:
- name: "NoiseFloat"
params:
column: "lastreceiptcost"
max_ratio: 0.15
decimal: 2
dynamic_params:
min:
column: "standardprice"
  1. The type overrides applied for example because the playground database does not contain any tables with float columns.

Result

ColumnOriginalValueTransformedValue
lastreceiptcost50.263547.87
Copyright © GreenMask 2026