
close
close
SQL Server Integration Services (SSIS) is Microsoft’s full feature extract-transform-load (ETL) tool in SQL Server 2005 and beyond. SSIS is used to extract data from any of a myriad of sources, such as SQL Server databases, flat files, Excel files, Oracle and DB2 databases, etc. It allows you to perform data manipulation and transformation on the data, and deliver it to one or more data destinations.
This is the first article in a series on beginning SSIS. For an introduction to the SSIS development environment – Business Intelligence Development Studio (BIDS) – see Introduction to the SQL Server Integration Services (SSIS) Development Environment.
All examples in this series are in SQL Server 2008 and Visual Studio (BIDS) 2008.
The package we create will pull data from one SQL Server table and push it to another SQL Server table. To accomplish this, we will:
Create a new Integration Services project in BIDS. In the Solution Explorer, right-click the package and rename it as “BeginningSSIS1.dtsx”. A dialogue will ask if you want to rename the package object; click Yes.
The new, empty package has four tabs at the top of the development window. You will use the Control Flow and Data Flow tabs to build your SSIS package.
Drag and drop a Data Flow Task onto the Control Flow screen.
Right-click the Data Flow Task and rename it after the table it affects (in this case, Production_Product).
Note: It is a good practice to rename all package objects to something meaningful – tasks, containers, connection managers, etc.
Elements on the Control Flow screen control the flow of the package, not of the data. Using Control Flow elements, you determine which tasks must be completed first, which can be run in parallel, which will run in a loop, and so forth.
By contrast, Data Flow includes anything that causes the data itself to move. Data Flow tasks pull data from one or more data sources into the SSIS execution engine, perform transformations, and send the data out to one or more destinations.
Data flow tasks can hide great complexity, so a package that looks simple on the Control Flow screen may actually be very complex when viewed on the Data Flow screens.
Double-click the Data Flow Task (or click the Data Flow tab) to open it. To set up your data source, complete these steps:
Note: It is good practice to retrieve only the columns that you will need.
To set up your data destination:
To run this package from SSIS, either press F5 or click the green “Start Debugging” arrow at the top of the screen. If the package executes successfully, all the elements will display in green.
At this point, we have moved specific columns of data from one table to another. Future additions to this package might include an Execute SQL task to truncate the destination table before the data flow, or the addition of a new timestamp column, an exception handling path, or more, depending on the business needs.
More in SQL Server
SQL Server Essentials: Using SQL SELECT and the WHERE and HAVING Clauses to Retrieve Data
Apr 12, 2023 | Michael Otey
SQL Server Essentials: Modifying Table Data With SQL Insert, SQL Update, SQL Delete and Truncate
Mar 29, 2023 | Michael Otey
Most popular on petri