Aggregate (Group By) Transformations Control in SSIS

Introduction

 
In this article, we are going to see how to use an Aggregate (Group by) data flow transformation control in SSIS packaging. With this function operation we can get a list of grouping necessary to get result in desired format. Let's jump into to the example of how to use this control in real time.
 
To follow my series of articles on SSIS packages, look into my profile.
 

Aggregate (Group by) data flow transformation control in SSIS

 
Follow steps 1 to 3 on my first article to open the BIDS project and select the right project to work on an integration services project. Once the project is created, we will see how to use an aggregate control for grouping the columns.
 
Here we will see the Group By operation in the aggregate control. I have added an OLEDB connection which fetches the data from the database upon which we are going to do Grouping manipulations and then pass it to a file destination as shown in the screen below:
 
TransConSSIS1.jpg 
 
The last 2 controls have a red mark inside the control indicating that the control is not configured. We step forward and configure them. Now double-click on the Aggregate function; that will open a pop-up window as shown in the screen below:
 
TransConSSIS2.jpg 
 
Here we are selecting the columns that we need a Grouping of data as shown in the screen. And after selecting the number of columns for the group then click on the OK button to get configured. Now configure the Flat File Destination as shown in the screen below.
 
TransConSSIS3.jpg 
 
Once everything is configured your screen will look as shown in the screen below:
 
TransConSSIS4.jpg 
 
Now Hit F5; the application will run and show the output as shown in the screen below:
 
TransConSSIS5.jpg 
 
Here the numbers of rows are indicated at the bottom of each control as shown in the screen above. And finally the results (Grouping of the columns based on product) are loaded to a flat file destination which looks like below:
 
TransConSSIS6.jpg 
 

Conclusion

 
So in this article, we have seen how to do a grouping of a number of columns using an Aggregate function transformation in data flow tab.


Similar Articles