introduction of ssis
DESCRIPTION
TRANSCRIPT
Introduction of SQL SERVER
INTEGRATION SERVICES
Presented By :- Deepak Kumar
What is ssis ?SQL Server Integration Services (SSIS) is a component
of the Microsoft SQL Server database software that can be used to perform a broad range of data integration tasks.
SSIS is a platform for data integration and workflow applications. It features a fast and flexible data warehousing tool used for data extraction, transformation, and loading (ETL).
Data import/Export WizardIt makes easy to data move one data base to another database. 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 performs data manipulation and transformation on the data and delivers it to one or more data destinations.
Why we use SSIS:- Connections to a vast number of data sources - flat files, other, excel file and more
than one database sources and XML sources, etc.
At one point of time we can send Data to many Destination – Flat Files, Xml source which we can’t do through SSMS.
We can handle errors in SSIS in good way.
SSIS provide one useful functionality which allow the Developers the ability to see data as it flows through SSIS pipeline. Basically it can display the Data Output before putting the Data in their Actual Destination which I guess we can’t do in SSMS.
ETL tools in most cases contain a GUI that helps users conveniently transform data as opposed to writing large programs to parse files and modify data types - which ETL tools facilitate as much as possible.
Check Points help to capture the package execution like a recorder and assists in restarting the package execution from the point of failure instead of running the package from the beginning.
You can perform most of the tasks with minimal or no coding. It can load millions of rows from one data source to another within few minutes.
Component of SSIS :-
SSIS
Control Flow Task
Data Flow Task
Event Handlers
Tools of Control Flow Task:-Control flow items Maintenance plan task
Tools of Data Flow Task:-
Description of some control flow task:-Bulk insert task:- This tools is use to bulk
insert in database.Comp0nent of bulk insert task: Connection:- database connectivity to whom
data has to be inserted.Destination table name:- The name of table in
which the data has to be insertedFormat:- format of file specify or use file these
are two component of file.Source Connection:- here specify the file which
to be uploaded.
Bulk Insert task Editor:-
Execute SQL Task:-This is used for create, truncate or drop the
table.We can also used to execute select ,insert, or
update statement.Through this task we can execute the
procedure.Create, drop, Truncate Excel Sheet through
this tools.
Execute SQL TASK editor:-
Execute file system task:- The File System task performs operations on files and directories in the file
system. For example, by using the File System task, a package can create, move, or delete directories and files. You can also use the File System task to set attributes on files and directories. For example, the File System task can make files hidden or read-only
The File System task includes a predefined set of operations. The following table describes these operations
File System Task Editor:-
Recursive Tools:- Where we have to need to perform any
repeated task for this SSIS give us two tools which is used to use in SSIS package.
For Loop Container and Foreach Loop Task :-
For Loop container:- The For Loop container defines a repeating control flow in a package. The loop
implementation is similar to the For looping structure in programming languages. In each repeat of the loop, the For Loop container evaluates an expression and repeats its workflow until the expression evaluates to False.
The For Loop container uses the following elements to define the loop: An optional initialization expression that assigns values to the loop counters. An evaluation expression that contains the expression used to test whether the loop
should stop or continue. An optional iteration expression that increments or decrements the loop counter.
Script Task:-The Script task provides code to perform functions that are not
available in the built-in tasks and transformations that SQL Server Integration Services provides. The Script task can also combine functions in one script instead of using multiple tasks and transformations. You use the Script task for work that must be done once in a package (or once per enumerated object), instead than once per data row.
You can configure the Script task in the following ways: Provide the custom script that the task runs. Specify the method in the VSTA project that the Integration Services
runtime calls as the entry point into the Script task code. Specify the script language. Optionally, provide lists of read-only and read/write variables for use
in the script. You can set these properties through SSIS Designer or
programmatically
Data Flow Task:-This is very specialized task load transforms
Data into an OLE DB destination.The Data Flow task encapsulates the data
flow engine that moves data between sources and destinations, and lets the user transform, clean, and modify data as it is moved. Addition of a Data Flow task to a package control flow makes it possible for the package to extract, transform, and load data.
Sources and Destination of Data Flow Task:-
OLE DB Source and OLE DB Destination:-OLE DB Source:- This is used to fetch the
data from a table of database or fetch the data from procedure.
OLE DB Destination:- This is used to insert the data from one database to another database.
OLE DB Source Editor:-
OLE DB DestinationEditor:-
Excel Source and destination:-Excel Source:- it is used to data import
through excel sheet which is in any format.Excel sheet only accepts Unicode string
(DT_WSTR) but OLE DB source or destination both support NON-Unicode String (DT_STR). When we import the data from excel sheet to database then always we have to convert data through Unicode to non Unicode.
As same as when we are using Excel Destination then we have to convert the data non Unicode to Unicode.
Excel Source Editor:-
Excel Destination Editor:-
Some Important Dataflow Transformation Tools:-Data Conversion:- it is used to convert the
data types from one source to another destination.
Data Conversion Editor:-
Multicast Operator:-It is used to distribute the data from one
source to another different destinations.
Conditional Split:-The Conditional Split transformation can route
data rows to different outputs depending on the content of the data. The implementation of the Conditional Split transformation is similar to a CASE decision structure in a programming language. The transformation evaluates expressions, and based on the results, directs the data row to the specified output. This transformation also provides a default output, so that if a row matches no expression it is directed to the default output.
Derived Column:-The Derived Column transformation creates new
column values by applying expressions to transformation input columns. An expression can contain any combination of variables, functions, operators, and columns from the transformation input. The result can be added as a new column or inserted into an existing column as a replacement value. The Derived Column transformation can define multiple derived columns, and any variable or input columns can appear in multiple expressions.
Lookup Transformation:-The Lookup transformation performs lookups by joining
data in input columns with columns in a reference dataset. You use the lookup to access additional information in a related table that is based on values in common columns.
The reference dataset can be a cache file, an existing table or view, a new table, or the result of an SQL query. The Lookup transformation uses either an OLE DB connection manager or a Cache connection manager to connect to the reference dataset. For more information, see OLE DB Connection Manager and Cache Connection Manager
You can configure the Lookup transformation in the following ways:
Data upload from Excel to OLE DB Destination:-For achieve this goal we have to take a data flow task
from Control Flow task.After that we have to take three data flow tools.
Excel source :- In data flow task drag and drop excel source and create the connection through excel file as per discussed in above. Once a connection is established then we can allow the column which has to be inserted in database. After that Click ok and we have to go next step which is data conversion
Data conversion:- if the any varchar column is exists then the column has to converted into DT_STR and we have to link to the OLE DB Destination.
OLE DB Destination:- Create a Connection to the database and after that select a table in which data has to be inserted Or Click on new and create a new table in which the data has to be inserted. After that mapping the column.
Data Export from Database to different Destination:-