In Focus
C# Corner Mumbai Chapter: Learn Windows Presentation Foundation (WPF) with CMUG
Jabalpur Chapter Meet July 13: Register Now
Chandigarh Chapter: Developers Day on 29 June 2013
Delhi Chapter Hands On June 22: Limited Seats Register Now
Email :
Password :
Remember me?
Forgot password
Contribute
An Article
A Blog
A News
A Video
A Link
An Interview Question
Ask a Question
TECHNOLOGIES
.NET 4.5
Chapters
JavaScript, CSS
SharePoint 2010
Web Development
.NET Assemblies
Coding Best Practices
JQuery
SharePoint 2013
Web Services in C#
ADO.NET in C#
Current Affairs
JSP
Silverlight with C#
Windows 8
AJAX in C#
Databases & DBA
Leadership
Smart Devices
Windows Azure
Android Programming
Design & Architecture
Learn .NET
SQL
Windows Controls C#
Articles C#
Exception Handling C#
LightSwitch 2012
SQL Server 2012
Windows Forms C#
ASP.NET Controls in C#
Expression Studio
LINQ
Testing
Windows Phone 8
ASP.NET MVC with C#
Graphics Design
Mobile & Embedded
TypeScript
Windows Server 2012
ASP.NET Programming
How do I
Office 2013
Visual C#
Windows Store Apps
BizTalk Server
HTML 5
OOP/OOD
Visual Studio .NET
Workflow Foundation in C#
C# Language
Internet & Web
Operating Systems
Visual Studio 2010
WPF
C# Tutorials
iPhone/iPad
PHP
Visual Studio 2012
XAML
C, C++, MFC
Java
Products
WCF with C#
XML
Career Advice
Java and .NET
Project Management
Request a new Category
|
View All
ANSWERS
BLOGS
VIDEOS
INTERVIEWS
BOOKS
LINKS
NEWS
CHAPTERS
CAREER ADVICE
Simple Tooltip Using HTML and CSS
Kolkata Chapter Developer Day Official Recap
Object Oriented Programming Using C#: Part 9
JsAction with T4 Template
Logging Using Log4net in Compact Framework 2 ...
Learn OOP Interface Using C#
S.O.L.I.D Principle Inversion of Control and ...
How To Find A Doctor Near Your Home in SQL S ...
Creating Simple MVVM Application With Data B ...
How to Add an Alias (CNAME) Resource Record ...
ARTICLE
18
5,371
Row Sampling Transformation in SSIS
Posted by
Karthikeyan Anbarasan
in
Articles
|
SQL Server 2012
on
May 18, 2011
Tags:
Row Sampling transformation in SSIS
,
SSIS Packaging
,
Row Sampling in SSIS
,
Row Sampling transformation in SSIS Packaging
,
Row Sampling transformation in SSIS
,
SSIS Row Sampling transformation
,
SSIS Row Sampling
This article talks about row sampling (selected and unselected output) transformation in SQL Server Integration Services.
Tweet
4174
0
0
Reader Level:
Introduction:
In this article we are going to see how to use a Row Sampling transformation in SSIS Packaging. Row sampling is used to randomly select some rows and move them as output to the required process as and when required to divide the rows. An example of using this transformation is say example if we want to select some randomly 10 users of a community for a random prize then we can use this transformation. In this process we are going to see an example of how to use this process for the unselected output values. Let's jump start to see this sample of how to set the properties of the control.
Steps:
Follow steps 1 to 3 in my first article to open the BIDS project and select the right project to work on an integration services project. Once the project is created, we will see how to use the Percentage sampling to see the flow. Now once the project has been opened, drag and drop a source and a Percentage sampling task as shown in the screen below:
Now we can see the red mark on the control which indicates that the controls are yet to be configured. Now let us configure the source (refer to my previous articles on how to configure OLEDB source). Now your screen will look like below:
Now we need to configure the Row Sampling task; double-click the task to open the screen as below:
Here we can specify the number of random rows to be selected and the name for the Sample output selected and unselected. Since in our example we are going to see the Selected and Unselected Output we will see how to use it. Now after specifying the number of rows just click on the OK button. Now drag and drop the Flat File Destination and an Excel destination as shown in the screen below:
Now drag the green line from the Row Sampling to the Flat File destination and the Excel destination task. It will open a window as shown in the screens below:
Here we have selected the Selected output for Excel destination and Unselected output for Flat file destination as the Output to get the data as we can see in the screen above. Now click on OK to do the further configuration of the destinations as shown in the screens below:
Once the configuration is done we can see the screen as below:
Now our package is ready to execute. Press F5 and execute the project; we can see the screen as below which indicates that the package is executed successfully:
We can see out of 91 rows 10 moved randomly to one destination and 81 moved randomly to one destination as we selected the selected rows and the unselected rows as per our requirement.
You can see the result as shown in the screen below.
Unselected Output:
Selected Output:
Conclusion:
So in this article we have seen how to use the Row Sampling (Selected and Unselected Output) to execute dataset and split based on the number of rows and use it across the requirement.
Login
to add your contents and source code to this article
This Feature is Sponsored By
.NET Diagramming framework designed for creating advanced solutions
How to use RowCount in SSIS
Tags:
How to use RowCount in SSIS
,
RowCount in SSIS
,
SSIS RowCount
Index in SQL Server 2008
Tags:
.net
,
C#
,
Index in sqlserver 2008
,
Normal Index
,
sqlserver 2008
,
Unique Index
,
VS 2010
Related Articles
SQL Server Integration Services (SSIS)- Percentage Sampling Transformation (Selected and Un-Selected Output) in SSIS
Row Sampling (Selected Output) Transformationin SSIS
SQL Server Integration Services (SSIS) - Percentage Sampling Transformation (Selected Output) in SSIS
SQL Server Integration Services (SSIS) - Merge Transformation in SSIS
Lookup Transformation in SSIS
Row Sampling (Un-Selected Output) Transformationin SSIS
SQL Server Integration Services (SSIS) - Merge Join Transformation in SSIS
SQL Server Integration Services (SSIS) - Copy Column Transformations in SSIS
SQL Server Integration Services (SSIS) - Import Column Transformation in SSIS
SQL Server Integration Services (SSIS) - Fuzzy Lookup Transformation in SSIS
comments
View Previous Comments
of
COMMENT USING
PREMIUM SPONSORS
DynamicPDF Developer Components
DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and add new content to existing PDF documents from within your applications.
TRENDING UP
Simple Tooltip Using HTML and CSS
Kolkata Chapter Developer Day Official Recap
Object Oriented Programming Using C#: Part 9
JsAction with T4 Template
Logging Using Log4net in Compact Framework 2.0 in Visual Studio 2008
Learn OOP Interface Using C#
S.O.L.I.D Principle Inversion of Control and Resolution With Dependency Injection
How To Find A Doctor Near Your Home in SQL Server
Creating Simple MVVM Application With Data Binding
How to Add an Alias (CNAME) Resource Record to a Zone
View All
MOST LIKED ARTICLE
WCF Introduction and Contracts - Day 1
Create SSRS Report Using Report Wizard
CREATE READ UPDATE and DELETE - CRUD Operation Using LINQ to SQL
WCF - Data Contract - Day 4
Factory Design Pattern
Follow @twitterapi
HOT KEYWORDS
.NET Framework 4
Access
BIDS
BLOB
FTP Task in SSIS Package
Functions
Import Data
Microsoft SQL Server 2008
Mobile Device
Mysql server
performance tuning
remote
Send Mail Task in SSIS
source code
SQL Query
SQL Server 2008
sql server 2012
SQL Server Integration Services
SQL Server Interview Questions
SQL server Management Studio
SQL Server tutorials
sqlserver 2008
Sridhar Rama subramanian
SSIS
SSIS tutorials
SPONSORED BY
DynamicPDF ReportWriter Suite
PDF reports have never been easier to create. With our included WYSIWYG Designer, you can layout your reports, set up your data source and let DynamicPDF ReportWriter do the rest.
My Facebook Friends
WHITEPAPERS AND BOOKS
Interview Questions on SharePoint 2013
SharePoint 2010 Administration & Development
Getting Started with Managed Metadata Service in SharePoint 2010
Windows Phone 7 Hileleri
Windows Phone Development Step by Step Tutorial
Essentials of SharePoint 2010: Business Intelligence Capabilities
Working with Directories in C#
FileInfo in C#
Programming List with C#
Source Code: Graphics Programming with GDI+
View All
Poll
Result
All Polls
Speed of C# Corner
How do you find speed of C# Corner when visiting the site?
Very Fast
OK
Slow
Very Slow
How do you find speed of C# Corner when visiting the site?
Options
Votes
%
Very Fast
4
6.90
OK
47
81.03
Slow
4
6.90
Very Slow
3
5.17
Total
58
100%