2. What is ssis ?
⚫ SQL Server Integration Services (SSIS) is acomponentof the
Microsoft SQL Server database software that can be used to
performa broad rangeof data integration tasks.
⚫ SSIS is a platform fordata integrationand workflow applications.
It features a fast and flexible data warehousing tool used for data
extraction, transformation, and loading (ETL).
⚫ Data import/Export Wizard
It makeseasy 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 performsdata manipulationand transformation
on thedataand delivers it tooneor moredatadestinations.
3. Why we use SSIS:-
⚫ Connections toavast number of data sources - flat files, other, excel file and more than
onedatabase sourcesand XML sources, etc.
⚫ Atone point of timewecan send Data to many Destination – Flat Files, Xml source which
wecan’t do through SSMS.
⚫ Wecan 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 theirActual Destinationwhich I guesswecan’tdo in SSMS.
⚫ ETL tools in most cases contain a GUI that helps users conveniently transform data as
opposed towriting largeprograms to parse files and modify data types - which ETL tools
facilitateas much as possible.
⚫ Check Points help tocapture the package execution likea recorderand assists in restarting
the package execution from the point of failure instead of running the package from the
beginning.
⚫ Youcan perform most of the taskswith minimal or no coding. Itcan load millions of rows
from one data source toanotherwithin few minutes.
4. Component of SSIS :-
SSIS
Control
Flow Task
Data
Flow Task
Event
Handlers
5. Tools of Control Flow Task:-
Control flow items Maintenance plan task
7. Description of some control flow task:-
⚫Bulk insert task:- This tools is use to bulk insert in
database.
⚫Comp0nentof bulk insert task:
Connection:- databaseconnectivity towhom data has
to be inserted.
Destination table name:- The nameof table in which
thedata has to be inserted
Format:- formatof file specifyor use file theseare two
component of file.
Source Connection:- here specify the filewhich to be
uploaded.
9. Execute SQL Task:-
⚫This is used forcreate, truncateordrop the table.
⚫Wecan also used toexecuteselect ,insert, or update
statement.
⚫Through this task wecan execute the procedure.
⚫Create, drop, Truncate Excel Sheet through this tools.
11. 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 setattributes on files and directories. For
example, the File System task can make files hidden orread-only
⚫ The File System task includes a predefined setof operations. The following tabledescribes
theseoperations
13. 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 Containerand Foreach Loop Task :-
14. For Loop container:-
⚫ The For Loop containerdefines a repeating control flow in a package. The loop implementation is
similarto 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 containeruses the following elements to define the loop:
⚫ An optional initialization expression that assignsvalues to the loopcounters.
⚫ An evaluation expression that contains the expression used to test whether the loop should stop or
continue.
⚫ An optional iteration expression that incrementsordecrements the loop counter.
15. Script Task:-
⚫ The Script task providescode toperform functions thatare not
available in the built-in tasksand transformations that SQL
Server Integration Services provides. The Script task can alsocombine
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 (oronceperenumerated object), instead thanonce
perdata row.
⚫ Youcan configurethe Script task in the following ways:
⚫ Provide thecustom script that the task runs.
⚫ Specify the method in the VSTA project that the Integration Services
runtimecalls as theentry point into the Script task code.
⚫ Specify the script language.
⚫ Optionally, provide lists of read-only and read/writevariables for use in
the script.
⚫ You can set these properties through SSIS Designeror
programmatically
16. Data Flow Task:-
⚫This isvery specialized task load transforms Data into
an OLE DB destination.
⚫The Data Flow task encapsulates thedata flow engine
that moves data between sources and destinations,
and lets the usertransform, clean, and modify dataas
it is moved. Addition of a Data Flow task toa package
control flow makes it possible for the package to
extract, transform, and load data.
18. OLE DB Source and OLE DB Destination:-
⚫OLE DB Source:- This is used to fetch thedata from a
tableof databaseor fetch thedata from procedure.
⚫OLE DB Destination:- This is used to insert thedata
from onedatabase toanotherdatabase.
21. Excel Source and destination:-
⚫Excel Source:- it is used todata import through excel
sheetwhich is in any format.
⚫Excel sheet only accepts Unicode string (DT_WSTR)
but OLE DB sourceordestination both support NON-
Unicode String (DT_STR). When we import the data
from excel sheet to database then always we have to
convertdata through Unicode to non Unicode.
⚫As sameas when weare using Excel Destination then
we have toconvert thedata non Unicode to Unicode.
24. Some Important Dataflow Transformation Tools:-
⚫Data Conversion:- it is used toconvertthe data types
from one source toanotherdestination.
⚫Data Conversion Editor:-
26. Conditional Split:-
⚫The Conditional Split transformation can route data rows
todifferentoutputs depending on thecontent of thedata.
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 transformationalso provides a
default output, so that if a row matches no expression it is
directed to thedefaultoutput.
27. Derived Column:-
⚫The Derived Column transformationcreates 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
inputcolumns can appear in multipleexpressions.
28. Lookup Transformation:-
⚫The Lookup transformation performs lookups by joining
data in inputcolumns with columns in a referencedataset.
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
orview, a new table, or the result of an SQL query
. The
Lookup transformation uses eitheran OLE DB connection
managerora Cacheconnection manager toconnect to the
reference dataset. For more information, see OLE DB
Connection Managerand Cache Connection Manager
⚫You can configure the Lookup transformation in the
following ways:
29. Data upload from Excel to OLE DB Destination:-
⚫Forachieve this goal we have to takeadata f low task from
Control Flow task.
⚫Afterthatwe have to take threedata 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 aconnection is established then wecan allow
the column which has to be inserted in database. After that
Click ok and we have togo next stepwhich is dataconversion
⚫ 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 newand createa new table in which thedata has
to be inserted. Afterthat mapping thecolumn.