Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

rowcount in ssis package

Posted on 2015-02-13
3
Medium Priority
?
137 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
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 66

Accepted Solution

by:
Jim Horn earned 2000 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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

886 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