Upload
munishraghavan
View
11
Download
0
Tags:
Embed Size (px)
DESCRIPTION
--
Citation preview
INFORMATICA 27/06/2011 TABLE OF CONTENTS 1. Import or Create a Source Definition..........................................................................2-4 1.1 To Import a Source From Database..............................................................................................5-6 1.2 To Import XML.........................................................................................................................7-10 1.3 To Create a new Source Definition............................................................................................11-12 2.Import or Create a Target Definition........................................................................13-15 3.Import or Create Transformations...........................................................................16-19 4.Create a Mapping.....................................................................................................20-26 5.Create a Session and Workflow................................................................................27-42 6.Executing and Monitoring the Workflow.................................................................43-44 <BUSINESS INTELLIGENCE> Author: <PANKAJ SHARMA> [email protected]
1
PREFACE The Steps underneath depicts the flow by which you can successfully create and execute a workflow in Informatica. The basic mapping in Informatica contains a Source definition,Tranformations and a Target definition. Steps:
1.Create or Import a Source. First open Source Analyzer tool from the Tools menu as shown below.
2
The Source definition in informatica can be a Flat File,a XML or a Oracle Table as shown below.
3
For Creating a Source definition,Go to the Sources menu and choose the type of source you want to create.
If you want to create a new source definition,then click on Create,otherwise import existing Source defintion from database or a XML (xsd schema,xml etc) file or a Microsoft Excess file.
4
1.1 To Import a Source From Database
Say,you want to import any table from oracle database,then choose “Import From Database”,a window will open as shown below.
Now,here you have to provide the datasource name with the username and password for the database .
Then click on Connect button .
5
Now,if your provided credentials are correct,the following window will appear as shown below. You can select the name of the table you want to incorporate as Source Definition.
6
1.2 To Import a Source as XML
Now,say if you want to import any XML(xml,xsd schema etc)File as Source Definition,then choose the “Import Xml Definition”from the Sources menu .The XSD schema specifies how to formally describe the elements in XML document.
A window will open as shown below,from here you can browse your XML(xml,xsd schema etc)File for Source definition.
7
8
You will get this window after selecting your XML file.
From this window,you have the privilege to choose the XML view or choose to customize the
view. After you choose and click on Finish,your XML Source defintion will get created in the Source
Analyzer tool.
9
On Double click,your XML Source Definition will show you the XML view.From here you can
view and edit .
10
1.3 Create a New Source Defintion
Now say, if you want to create a Source Definition on your own,then choose Create from the Source menu..
The Create Source window will open as shown below.From this window ,you can select the type of Source definition you wish to create.
11
Now,if you double click over the Created Source Definition,the window shown below will
open. From this window,you can create the columns,assign their datatypes and properties.
To add coulmns, click on this icon.
12
2.Create or Import Target Definition.
Goto the Tools menu and select “Target Designer” as shown below.
13
The Target designer window will open as shown below.
14
Now ,Employ the Same steps as employed during the creation of Source definition.
15
3.Transformation Creation
You can also design your own custom transformation using Transformation Developer tool as
shown below.
16
You can import any Stored Procedure from database by following the same steps as importing a source definition from database or you can create a new transformation through Create in Transformation menu.
The transformations created here will be reusable in nature and will reflect in the navigator under Transformation folder.
You can drag and drop these tranformation into the mapping designer window as per your requirement.
17
As soon as you are done with the selection of the stored procedure through import ,the stored procedure window will come in the Transformation Developer pane.
18
Now,if you double-click over the stored procedure window ,the window shown below will
open. Here you can provide the port names and properties on the basis of what all thing it will take as
input and what values it will return.
19
4.Create Mapping
For creating a mapping,first drag and drop source definition and target definition from the navigator.
The source defintion will appear in the mapping designer window with a source qualifier. From the Source Qualifier,you can open the Edit transformation window on double-click. In the ports tab ,you can give the ports you wish to include and their properties. You can also provide a SQL Query in the properties tab. From the query,you have the privilege to take data according to your requirement from various
tables in the database.
20
Now,drag and drop the reusable transformation from the navigator menu on left or create a new
transformation from the Create in Transformation menu .
21
You will get this Create Transformation window as shown below. From here ,you can choose the type of transformation ,you want to create.(For the detailed
explanation and working of each transformations and naming conventions,you can refer informatica help guide.)
22
Now you have everything in place,Source ,Transformation and Target. All you need to do now,is to link all these defintions. For this you can place your mouse pointer on one field and drag it to some field(of same
datatype) present in other defintion .
23
In the Transformation window, you can double-click and get Edit Transformation window. Here you can define ports and properties(conditions) on which transformation will work for
producing the desire result.
24
If you want to supply the value of some variables through a external file(parameter file),you can name those variables in mapping parameters and variables under Mappings menu.
25
The mapping parameters or variables can be named here and with the same name you can put them inside the parameter file along with their value.
When you want to use these parameter values,you can declare them inside the transformations.Example: $$Emp_Id.
The Emp_ID will automatically take value from the parameter file or the initial value mentioned in the Declare Parameters and Variables window shown below.
Now you can save your mapping. Open the Workflow Manager by clicking on icon W present in the toolbar .
26
5.Creating Session and Workflow
First open the task Developer window from the Tools menu.
27
Now,click on Create in Tasks menu.
28
From here you can select the type of Task,you wish to create. Generally,Session is used to link the created mapping . All tasks have some specific functionalities,based on which, you can choose them for your
purpose.
29
Now,as shown below,it will ask for the mapping you wish to link with this task.. You can select that mapping from the list and your Task (session) will get create.
30
Now you can double-click your session and add properties to it.
31
In the properties tab,you can provide the path of the parameter file,if you have used any
mapping parameter value in your mapping. The path value will start from : $path The Source Connection Value and Target Connection value are defined based on the type of
Source and Connection definition.
32
Click on the mapping tab of the Edit Tasks window . Here you can see all the transformations that you have used in your mapping and their
connection values.You can also provide connection values by clicking on the down-arrow icon next to it.
.
Down-arrow icon
33
You can also set Attribute value here,depending on your requirement. After this save your session.
34
Now open Workflow Designer from Tools menu.
35
Now,drag and drop your created session from navigator menu into the Workflow Designer
window.
36
Goto the Workflows menu and click Create. A new window will open for workflow creation.
37
Here you can give your workflow name and assign an Integration Service to it,by using the icon
next to the Integration Service as shown below. You have to provide the parameter file name in the workflow Properties tab,if you are using any
parameter file for taking the values of parameters and variables in your mapping.
38
After doing the above steps,a Start icon will appear as shown below. Now,you can link it with your session by using the Link Task from the Tasks menu. Save the Workflow.
39
Now,double click on the session,and you will see a window as shown below.
40
In case of multiple sessions associated with a workflow or for some script execution,you wish
to execute before or after execution of this session . Here,you can provide pre-session or post_session commands,you wish to execute before or after
execution of this particular session. Save the workflow again.
41
Now, you are done with the creation of workflow,you can execute it by going to the Workflows menu and select Start Workflow.
42
6.Monitoring Workflow Execution
As soon as you Start Workflow execution,the Workflow Monitor pane will open. Here you can view your workflow success or failure reports. You can see workflow log as well as Session log,after right-clicking on the respective
Workflow or Session.
43
THANK YOU
44