The BlockTransformation is a real blocking transformation. It will block processing until all records arrived, and use up as much memory as needed to store the incoming rows. After this, all rows are written into the output.
A BlockTransformation waits until all data is received at the BlockTranformation - then it will be available in a List object and you can do modifications or calculations on your whole data set. Keep in mind that this transformation will need as much memory as the amount of data you loaded.
Input and output type doesn’t have to be the same. If you use the BlockTransformation with only one type, output type will be the same as the input type. If you define both types, you will have access to a list of all data of your InputType, and you are expected to return a list of your new data of your output type. The BlockTransformation does not care how many records are going in or out - both sets can be totally different.
The BlockTransformation has an input and output buffer. You can’t restrict the number of rows stored in the input buffer, as it will always store all incoming data. But you can restrict the amount of records in the output buffer using the MaxBufferSize property on the component.
This example will calculate the average price per weekday using a BlockingTransformation. Have a look at the Aggregation if you are in need of calculating values on your aggregated data.
Sorting data is a very common case for a blocking transformation. A sort can only run when all data is available in the component. For this purpose, you can either use the Sort transformation. Or you can use the BlockTransformation to implement your own sorting algorithm. Here is an example, using the dynamic ExpandoObject approach.