Solved

rowcount in ssis package

Posted on 2015-02-13
3
123 Views
Last Modified: 2016-02-11
How do i modify a ssis package to add a rowcount of how many files were processed?
Thank you.
0
Comment
Question by:shwelopo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 44

Expert Comment

by:Rainer Jeschor
ID: 40609650
Hi,
that depends on where in the SSIS package you want to count.
In the control flow area you will have to use a variable with type INT and a default of 0 and update this either through a script task or executing some kind of dummy SQL using expressions to set the variable.
If you want to count inside data flows you can use the built-in row count transformation where you also need a INT variable.
In the latter case you have to use script/execute SQL tasks in the control flow if you have your data flow run in a loop to get an overall count as the next dataflow loop will overwrite the RowCount variable.
HTH
Rainer
0
 
LVL 65

Accepted Solution

by:
Jim Horn earned 500 total points
ID: 40609835
>How do i modify a ssis package to add a rowcount of how many files were processed?
1  Create a variable called iFileCount (or whatever floats your boat), and set it to zero.
2  In your For..Each File Loop create a Script task, with iFileCount as a read-write variable, that goes like this...

Dts.Variables("iFileCount").Value = Dts.Variables("iFileCount").Value + 1

Open in new window


3  If your package doesn't use a For..Each file loop, then spell out what you're doing.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
I have a large data set and a SSIS package. How can I load this file in multi threading?
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question