Home > SSIS > SQL SERVER – Row Counter using Row Count Task – SSIS

SQL SERVER – Row Counter using Row Count Task – SSIS


SSIS developers often need to audit the tables to check number of records transferred from source to destination. It is very easy if you use SSIS.

Row Count Transformation 

It gives us the row count value during data transformation.

This task helps the developer to achieve the most expensive task during data transformation. This task helps us to avoid table scan to fetch the row count in normal situation like “Select Count(*) from <Table>”.

This task stores the total row count in a package variable. We can use this variable in other tasks as we do with other variables. The benefit is, once the total row passes through this task then we can use the variable with the row count value for other purpose. For instance, constructing email with row count value to administrator to cross check the data.

Implementation

Step 1: Create a package, add data flow task.

Step 2: Add a data source task and configure with a database table that you want the row count.

Step 3: Add package variable with int data type.

Step 4: Add row count task and map the variable in the task editor to receive row count.

Step 5: Now connect task from data source to row count.

Step 6: Execute the package.

Thanks for reading.

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: