SSIS Package Tutorial

In SSIS Package are a combination of Connection Managers, Control Flow Tasks, Data Flow Elements, Parameters, and Event Handlers that you use to perform ETL operation.

The SSIS Package is all about extracting data from various sources, transform it, and load in totally different destinations.

Create an SSIS Package

When you create a New Project, BIDS automatically creates a new package. However, you have a choice to create a new package in SSIS.

Create SSIS Package Tutorial 1

To do so, right-click on the SSIS Packages folder, and select New SSIS package option from the context menu

Create SSIS Package Tutorial 2

It will create a new package as shown in below screenshot

Create SSIS Package Tutorial 3

SSIS Package Tutorial

If you observe the below screenshot, each package has six different tabs.

Connection Managers

We need a connection manager to establish the connection between the SSIS package and source, and package and destination. I suggest you to refer Introduction to Connection Managers article to understand them.

Control Flow Tasks in SSIS Package

A package should contain at least one control flow element. Control Flow is a combination of Containers, Tasks, and Precedence Constraints.

Containers

For Loop and Foreach Loop containers works similar to For Loop and Foreach loop in any programming language. The sequence container helps to group multiple tasks.

Tasks

Control Flow Tasks are used to work with local files, FTP files, Web Services, Scripts, etc. You can use these tasks to perform Database administrative tasks as well.

Precedence Constraints

Use Precedence Constraints to control the tasks flow. For example, you can write qualified expressions that have to meet before executing any task.

Create SSIS Package Tutorial 4

SSIS Package Data Flow Elements

Data Flow tab is a combination of Sources, Transformations, and Destinations. By default, you cannot work in the Data Flow tab. Therefore, before you start working on the Data Flow tab, you have to add the data Flow Task in the Control Flow tab.

From the below screenshot, you can observe that there are three sections and a Favorite section:

Favorite section

If you do not know the necessary steps involved in connecting with Source or Destination, you can use Source Assistance and Destination Assistance. These two provide a detailed and easy Wizard. By using this wizard, you can establish a connection with Source and Destination.

Sources

A source is a place where you want to extract data. SSIS package supports a wide variety of sources such as Excel Files, Flat Files, XML Files, Relational databases

Transformations

A list of transformations available under this section is used to transform (slice and dice) data as per your requirement. For example, you can Pivot Data, Merge two tables, Sort tables, etc. within your package

SSIS Destinations

A destination is a place where we load the final data (after transformation). SSIS package supports a wide variety of destinations such as Relational databases, OLE DB, ODBC destinations, Excel Destination, Flat Files Destination, XML Destination, etc.

Create SSIS Package Tutorial 5

Parameters

SSIS Package Parameters help you to modify the package without changing the entire package and replotting it. There are two types of parameters in SSIS, and they are Project Parameters and Package Parameters. I suggest you to refer SSIS Parameters article to understand the creation of parameters.

Create SSIS Package Tutorial 6

Event Handlers

This tab is useful for managing the raised events in the run-time. For example, if you want the package to send an email to a manager after the package executed, then create a script task for the onPostExecute event. I suggest you refer to Event Handlers in the SSIS to understand the process of configuring events.

Create SSIS Package Tutorial 7

SSIS Package Explorer

This tab will display all the elements in a package that includes: Connection Managers, Tasks, Parameters, Event Handlers, Variables, etc.

Create SSIS Package Tutorial 9