dwh record

Upload: rakhichowdary

Post on 29-May-2018

224 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/9/2019 Dwh Record

    1/34

    SIMPLE TRANSFORMATION

    Aim: To transform the required data in a required form from the source database to the targetdatabase.Procedure:Step 1:

    Start the ServicesGo to Start Settings Control panel Administrative Tools Services

    In the above window start Informatica Repository Server and Informatica.Step 2:

    Create user in the SQL.Go to Run type sqlplus type the username and password as system/srinu.

    SQL> create user mca123 identified by mca123;User created.SQL> grant dba to mca123;Grant Succeeded.SQL> Conn mca123/mca123;Connected.

    Step 3:Create the ODBC Connections.

    Go to Start Settings Control panel Administrative Tools (ODBC) Data SourcesGo to System DSN Click on AddThen following window will be opened.

  • 8/9/2019 Dwh Record

    2/34

    In the above window select Oracle in OraHome92 and Click on FinishThen the following window will be opened.

    In this write the Data Source Name, TNS Service Name and User ID and click onTest Connection.

    In that window type the password as tiger. Then the connection is created for source.For the target creation, again click on add and select Oracle in OraHome92 and click onfinish. The following window will be opened.

    Click on Test Connection and type the password as mca123.

  • 8/9/2019 Dwh Record

    3/34

    Click on ok then the target data source is connected.Step 4:

    Creation of Folder:Go to Start Programs Informatica Power Center 7.1.1 Informatica Power Center

    7.1.1 Client Repository Manager In the Repository manager window, select Student from the Repository Navigator and right

    click on that, the following window will be opened.

    In the above window type the password as Administrator and click on Connect.It will show the folders that are present in that.For creating a new folder click on Folder menu and click on create, the following windowwill be opened.

  • 8/9/2019 Dwh Record

    4/34

    In the Create Folder window type the name as mca123, check all permissions and Click onok, the folder will be created.

    Step 5:Creation of Source, Target databases and mapping.

    Go to Start Programs Informatica Power Center 7.1.1 Informatica Power Center 7.1.1 Client Designer.

    In the Repository manager window, select Student from the Repository Navigator and rightclick on that, type the password as Administrator and click on Connect.

    It will show the folders that are present in Student.Select the folder mca123 and click on Tools menu Source Analyzer, then the source analyzer window will be opened.

    Click on Sources menu import from databaseThe following window will be appear.

  • 8/9/2019 Dwh Record

    5/34

    In the window select ODBC data source name as mca123_source(Oracle in OraHome92),username as scott and password as tiger and clickon connect. Then the there appears a list of tables in select tables. Form that select required table and click on ok. It will displays as follows.

    Click on Save from the Repository Menu.For the creation of target database click on tools menu warehouse designer

    Warehouse designer window will be opened.

    Drag emp table form the source in the navigator window to the Warehouse Designer work space. Double click on the header of the emp table, Then it will appears as follows.

  • 8/9/2019 Dwh Record

    6/34

    Click on ok and click on Columns, Select only required columns and cut the remainingcolumns and click on apply, then the following window will be displayed. In this click on ok.

    The target database will be displayed on the Warehouse Designer work space as follows.

  • 8/9/2019 Dwh Record

    7/34

    After that click on Targets Menu Generate / Execute SQL..The following window will be opened.

    In that check all the Generation Options and click on Connect, it will display as follows.

    In this select ODBC data source name as mca123_target(Oracle in OraHome92) andusername as mca123 and password as mca123 and click on connect.

    Then click on Generate and execute and click on ok, then click on close.Click on Save from the Repository Menu.

    For mapping the source database to target database we have to do the following steps.Go to Tools click on Mapping Designer Then Mapping Designer work space will be opened.

  • 8/9/2019 Dwh Record

    8/34

    Click on Mappings menu Create

    Type the New Mapping Name and click on ok.Drag EMP table from source and T_EMP table from the targets to the Mapping Designer

    work space, It will appear as follows.

    Click on Layout menu click on Autolink, then it will appear as follows.

  • 8/9/2019 Dwh Record

    9/34

    Click on ok. Then the mapping will be done. It will display the following window.

    Click on Save from the Repository Menu.Step 6:

    Creation of sessions and workflows.Go to Start Programs Informatica Power Center 7.1.1 Informatica Power Center

    7.1.1 Client Workflow Manager Select Student from the Repository Navigator and right click on that, type the password as

    Administrator and click on Connect. It will show the folders that are present in that.Select a folder form the Repository Navigator and click on Tools Task Developer. The

    following window will be displayed.

  • 8/9/2019 Dwh Record

    10/34

    Click on Tasks Create, It will display the following window.

    Click on Create, select the mapping M_EMP and click on ok then Click on done.The session is displayed as follows.

    Click on Connections menu Relational, it will display the following

  • 8/9/2019 Dwh Record

    11/34

    In the above window select type as oracle and click on new, it will display the following.

    In the above window type the name as mca123_source, username as scott, password astiger and connect string as ora9i, click on ok.

    Again click on new and the same window will be opened. In that type the name asmca123_target, username as mca123, password as mca123 and connect string as ora9i,click on ok.

    Our source and target will appear in the Relational Connectional Browser window and click on close in that window.

    Double click on Session S_EMP and select the Mappings menu then the following window

    will be opened.

  • 8/9/2019 Dwh Record

    12/34

    In the above window select SQ_EMP from the sources and select Relational in theconnections as mca123_source.

  • 8/9/2019 Dwh Record

    13/34

    Click on T_EMP and select Relational as mca123_target in Connections and select Targetload type as Normal in Properties and click on ok.

    Click on Save from the Repository menu.For workflow creation, Click on Tools Menu Workflow Designer The workflow designer work space will be opened as follows.

    Click on Workflows Create, It will display the following window.

    In the above window type the Name as WF_EMP and click on ok. The workflow will becreated and it is displayed as follows.

  • 8/9/2019 Dwh Record

    14/34

    Drag the session S_EMP from the sessions to the workflow Designer workspace. It willdisplay as follows.

    Go to Tasks Click on Link Task, and drag the from the start to the S_EMP it will beshown as follows.

    Click on save from the Repository menu.Right click on Start and select Start Workflow form the task. The following window will be

    displayed.

    Output:

  • 8/9/2019 Dwh Record

    15/34

    By this the data from the Source database is transferred to the Target database.

    Result:

  • 8/9/2019 Dwh Record

    16/34

    EXPRESSION TRANSFORMATION

    Aim: To transform the required data in a required form from the source database to the targetdatabase by using Expression Transformation.Procedure:Step 1:

    Start the ServicesStep 2:

    Create user in the SQL.Connect user.

    Step 3:Create the ODBC Connections.

    Step 4:Creation of Folder:

    Step 5:Create Source, Target databases and mapping.

    For mapping the source database to target database we have to do the following steps.Go to Tools click on Mapping Designer. Then Mapping Designer work space will be

    opened. Click on Mappings menu Create

    Type the New Mapping Name and click on ok.Drag EMP table from source and E_EMP table from the targets to the Mapping Designer

    work space, It will appear as follows.

    Go to Transformation menu Create

  • 8/9/2019 Dwh Record

    17/34

    Click on Create and then Click on Done. Then a table will be opened and it is as follows.

    Drag all the required columns from SQ_EMP to EXP_EMP. It will be as follows.

    Double click on EXP_EMP table header, click on Ports, click on add button and add acolumn TAX and uncheck the box under I.

  • 8/9/2019 Dwh Record

    18/34

    Click on TAX under Expression, Click on Ports then the following window will be opened.

    In the above window double click on SAL and type the expression using the keypad appear on the screen. Click on Validate and then Click on OK.

    Map the EXP_EMP to the E_EMP table by using Autolink from the Layout menu. Thefollowing window will be opened.

    In this window select E_EMP and click on ok. Then the link will be generated as follows.

    Click on Save from the Repository Menu.

    Step 6:Creation of sessions and workflows.Select a folder form the Repository Navigator and click on Tools Task Developer.

    Click on Tasks Create. Create a session ES_EMP and Select the mapping EM_EMPand click on ok.

  • 8/9/2019 Dwh Record

    19/34

    Then click on done. The session is displayed as follows.

    Double click on Session ES_EMP and select the Mappings menu.Select SQ_EMP from the sources and select Relational as mca123_source in the Connections.Click on T_EMP and select Relational as mca123_target in Connections and select Target loadtype as Normal in Properties and click on ok. Click on Save.

    For workflow creation, Click on Tools Menu Workflow Designer The workflow designer work space will be opened. Click on Workflows CreateCreate a Workflow with the name EWF_EMP. Then the workflow is displayed as follows.

    Drag the session ES_EMP from the sessions to the workflow Designer workspace.Go to Tasks Click on Link Task, and drag from the start to the ES_EMPThen it will display the window as shown below.

  • 8/9/2019 Dwh Record

    20/34

    Click on save from the Repository menu.Right click on Start and select Start Workflow form the task. The following window will be

    displayed.

    Output:

    By this the data from the Source database is transferred to the Target database.

    Result:

  • 8/9/2019 Dwh Record

    21/34

    ROUTER TRANSFORMATION

    Aim: To transform the required data in a required form from the source database to the targetdatabase by using Router Transformation.Procedure:Step 1:

    Start the ServicesStep 2:

    Create user in the SQL.Connect user.

    Step 3:Create the ODBC Connections.

    Step 4:Creation of Folder:

    Step 5:Create Source, Target databases and mapping.

    Create two target databases with names DEPT10 and DEPT30 from the source database.For mapping the source database to target database we have to do the following steps.

    Go to Tools click on Mapping Designer. Then Mapping Designer work space will beopened. Click on Mappings menu Create

    Type the New Mapping Name as RM_EMP and click on ok.Drag EMP table from source and DEPT10, DEPT30 tables from the targets to the Mapping

    Designer work space, It will appear as follows.

    Go to Transformation menu Create

    Click on Create and then Click on Done. Then a table will be opened and it is as follows.

  • 8/9/2019 Dwh Record

    22/34

    Drag all the required columns from SQ_EMP to RM_EMP. It will be as follows.

    Double click on RM_EMP table header, click on Groups, click on add button and two groupswith the names of target databases i.e., DEPT30 and DEPT40.

  • 8/9/2019 Dwh Record

    23/34

    Click on Group Filter Condition then the following window will be opened.

    In the above window click on Ports and double click on DEPTNO and assign a value by using the keyboard displayed on the screen. Click on ok.

    For DEPT10 also do the same procedure.Map the RM_EMP to the DEPT10, DEPT30 tables by using Autolink from the Layout menu.

    The following window will be opened.

    Select DEPT10 From Transformation and To Transformation and click on apply now, andSelect DEPT30 From Transformation and To Transformation and click on ok. Check Position. Thenthe link will be generated as shown below.

  • 8/9/2019 Dwh Record

    24/34

    Click on Save from the Repository Menu.Step 6:

    Creation of sessions and workflows.Select a folder form the Repository Navigator and click on Tools Task Developer.

    Click on Tasks Create. Create a session RS_EMP and Select the mapping RM_EMPand click on ok. Then click on done. The session is displayed as follows.

    Double click on Session RS_EMP and select the Mappings menu.Select SQ_EMP from the sources and select Relational as mca123_source in the Connections.Click on DEPT10 and select Relational as mca123_target in Connections and select Targetload type as Normal in Properties and click on ok.Click on DEPT30 and select Relational as mca123_target in Connections and select Targetload type as Normal in Properties and click on ok. Click on Save.

    For workflow creation, Click on Tools Menu Workflow Designer The workflow designer work space will be opened. Click on Workflows CreateCreate a Workflow with the name RWF_EMP. Then the workflow is displayed as follows.

  • 8/9/2019 Dwh Record

    25/34

    Drag the session RS_EMP from the sessions to the workflow Designer workspace.Go to Tasks Click on Link Task, and drag from the start to the RS_EMPThen it will display the window as shown below.

    Click on save from the Repository menu.Right click on Start and select Start Workflow form the task. The following window will be

    displayed.

    Output:

    By this the data from the Source database is transferred to the Target database.

  • 8/9/2019 Dwh Record

    26/34

    Result:

  • 8/9/2019 Dwh Record

    27/34

    SIMPLE TRANSFORMATION USING XML FILE

    Aim: To transform the required data in a required form from the source database to the targetdatabase by using Router Transformation.Procedure:Step 1:

    Start the ServicesStep 2:

    Create user in the SQL.Connect user.

    Step 3:Create the ODBC Connections.

    Step 4:Creation of Folder:

    Step 5:Creation of Source, Target databases and mapping.

    Create a source file in XML as follows.

    Type the data in Notepad and save the file with .xml extention.Go to Start Programs Informatica Power Center 7.1.1 Informatica Power Center

    7.1.1 Client Designer.In the Repository manager window, select Student from the Repository Navigator and right

    click on that, type the password as Administrator and click on Connect.It will show the folders that are present in Student.

    Select the folder mca123 and click on Tools menu Source Analyzer, then the source analyzer window will be opened.

    Click on Sources menu import from XML definition.The following window will be appear.

  • 8/9/2019 Dwh Record

    28/34

    Select EEMP.XML file and click on ok. Then a window will be opened with the namechange XML views Creation and Naming Options. Click on Ok in that window. Click on

    Next then the following window will be opened.

    Select the option Hierarchy Relationships and Denormalized XML Views and click onfinish. Then XML file will be opened as a source table in the source analyzer work space and isas shown below.

  • 8/9/2019 Dwh Record

    29/34

    Click on Save from the Repository Menu.For the creation of target database click on tools menu warehouse designer Warehouse designer window will be opened.

    Drag EEMP table in XML_File from the source in the navigator window to the WarehouseDesigner work space. Double click on the header of the EEMP table. Rename the table witht_eemp and click on ok.

    The target database will be displayed on the Warehouse Designer work space.After that click on Targets Menu Generate / Execute SQL.Check all the Generation Options and click on Connect.Then click on Generate and execute and click on ok, then click on close.The target database will be opened as follows.

    Click on Save from the Repository Menu.For mapping the source database to target database we have to do the following steps.

    Go to Tools click on Mapping Designer Then Mapping Designer work space will be opened.Click on Mappings menu Create.Type the New Mapping Name as X_EEMP and click on ok.Drag EEMP table from source and T_EEMP table from the targets to the Mapping Designer

    work space, It will appear as follows.

  • 8/9/2019 Dwh Record

    30/34

    Click on Layout menu click on Autolink Click on ok. Then the mapping will be done. It will display the following window.

    Click on Save from the Repository Menu.Step 6:

    Creation of sessions and workflows.Go to Start Programs Informatica Power Center 7.1.1 Informatica Power Center 7.1.1 Client Workflow Manager

    Select Student from the Repository Navigator and right click on that, type the password asAdministrator and click on Connect. It will show the folders that are present in that.

    Select a folder form the Repository Navigator and click on Tools Task Developer. Thefollowing window will be displayed.

  • 8/9/2019 Dwh Record

    31/34

    Click on Tasks CreateClick on Create, select the mapping XML_EEMP and click on ok then Click on done.The session is displayed as follows.

    Double click on Session X_EEMP and select the Mappings menu then the followingwindow will be opened.

  • 8/9/2019 Dwh Record

    32/34

    In the above window select SQ_EMP from the sources and select Relational in theconnections as mca123_source.

    Click on T_EMP and select Relational as mca123_target in Connections and select Targetload type as Normal in Properties and click on ok.

    Click on Save from the Repository menu.For workflow creation, Click on Tools Menu Workflow Designer The workflow designer work space will be opened as follows.

    Click on Workflows Create, It will display the following window.

  • 8/9/2019 Dwh Record

    33/34

    In the above window type the Name as WF_EMP and click on ok. The workflow will becreated and it is displayed as follows.

    Drag the session S_EMP from the sessions to the workflow Designer workspace. It willdisplay as follows.

    Go to Tasks Click on Link Task, and drag the from the start to the S_EMP it will beshown as follows.

  • 8/9/2019 Dwh Record

    34/34

    Click on save from the Repository menu.Right click on Start and select Start Workflow form the task. The following window will be

    displayed.

    Output:

    By this the data from the Source database is transferred to the Target database.

    Result: