Solved

rowcount in ssis package

Posted on 2015-02-13
3
110 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 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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Here's a requirements document template for an integration project (also known as Extract-Transform-Load or ETL) based on my development experience as an SQL Server Information Services (SSIS) developer over the years.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

932 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now