SSIS: counting rows.

Hi, I need to count rows in the source flat file. Also, have to count how many were loaded in the destination table.
Thanks.
quasar_eeAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Data DudeCommented:
If we're talking an SSIS package, there is a Row Count transformation that you can insert between the source and destination, that will count the rows in the source and save to a variable.  Then you can use that variable however you wish.

Create an variable, int data type, name it something like 'iRowCount'
Insert the Row Count transform between source and destination in your data flow, connecting the arrows.
Double-click on the Row Count transform, and set the Variable Name property to your variable.

Then, tell us what you wish to do with this count.
Jim HornMicrosoft SQL Server Data DudeCommented:
Row Count Transform

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim HornMicrosoft SQL Server Data DudeCommented:
btw, if your company can cough up $1,000 per environment, Pragmatic Works has a suite of components called Task Factory, where the upsert destination task which allows for both inserting and updating as a destination, and it will save the number of rows inserted and updated to variables for later use.

Extremely handy for data warehouse work.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.