Overview
The Randomizer node randomly directs input data from two input streams (A and B) to a single output based on a selected method: either purely random or based on a specified percentage. This node is useful for scenarios where you want to split or route data probabilistically, such as A/B testing, load balancing, or randomized sampling of data streams.
Use Case Examples
- In A/B testing, route 60% of data to input A and 40% to input B using the percentage method.
- Randomly select data from either input A or input B with equal probability using the random method.
Properties
| Name | Meaning |
|---|---|
| Selection Method | Determines whether the node selects input data randomly or based on a percentage value. |
| Input Percentage for Input A (Only Numbers) | Specifies the percentage of times input A should be selected when using the percentage selection method. Input B is selected the remaining percentage of times. This property is only shown when the selection method is set to 'Percentage'. |
Output
JSON
0- Array of selected input data items combined from input A and/or input B based on the selection method.
Troubleshooting
- Error 'No input data found. Make sure to connect two inputs and that they contain data.' occurs if either input A or input B is missing or empty. Ensure both inputs are connected and contain data.
- Error 'Use Random option instead of Percentage with 49-59%' occurs if the input percentage for input A is set between 49% and 59%. Adjust the percentage outside this range or switch to the random selection method.
- Error 'Invalid selectionMethod parameter value' occurs if the selection method parameter is set to a value other than 'random' or 'percentage'. Ensure the selection method is correctly set.