The Shuffle generation rule reorders the values of its unique child. To acheive this goal, consecutives values of the source are saved in internal storage and muddled. The internal storage is then traversed.

As consequence, it is not recommended to refer to a child of a Shuffle since you can control the value of  that field.


To configure a shuffle you have to configure the child field providing the values to shuffle and the child field providing the size of the internal storage used to saved and shuffle source values.



Suppose you have a shuffle with a source child that is a sequence (providing 1, 2, 3, etc.) and a window size child providing a constant value of 5.

The shuffle rule will build an internal storage for saving 5 consecutive values from the source. The first time the shuffle is sollicitated it will fill its storage with the first 5 values of the sequence (1,2,3,4,5) and then shuffle it (3,2,1,4,5) and provide the first : 3

Then, the shuffle will provide content from the internal storage for the next 4 value (namely 2, then 1, then 5 and then 5).

Having provided all the values from the internal storage it will clear it and ask the window size source for the new size of the internal storage (which is again 5 because it is a constant in our example) and again ask for the next 5 values from the source (6,7,8,9,10), shuflle them and provide them.

It means that the shuffle will in fact muddle the source values by sections of winbdow size consecutive value. If the window size is large enough you can have the feeling that values are indeed muddled in their totality.

Add comment

Security code