hands on - oracle native sequence with odi interface

Upload: srinivas-kankanampati

Post on 10-Oct-2015

182 views

Category:

Documents


0 download

DESCRIPTION

OBIEE

TRANSCRIPT

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 1 10/23/2013

    Using Oracle Native Sequences with ODI Interface

    Created by Srinivasarao.Kankanampati(141549)

    In this process, first you have to define the procedure (Ex.Create_ORCL_SEQ_FAM_ID )in the ODI.

    Then execute this procedure, which creates the sequence SEQ_FAMILY_ID in the RDBMS. Next, use

    the ODI to create an ODI definition of the native sequence you just created in the RDBS using the same

    name, SEQ_FAMILY_ID.

    Finally create and execute the interface to load the target table by using new native sequence to

    generate ID numbers for that table.

    1. Login to the ODI and click on the Designer navigator tab. Expand your project and right click on

    Procedures and select New Procedure.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 2 10/23/2013

    2. Provide the new procedure details like name and target technology etc.

    3. In the detail tab, click the Add command button. In the name field, enter the name of your procedure

    (ex: Create ORCL SEQ). In the Schema drop down list, select the schema that you want to create this

    procedure (Ex. SAMPLE_SALES_TRG). In the command panel, enter the command, which creates the

    sequence (here sequence is Create_ORCL_SEQ_FAM_ID). Click the Save icon to save the procedure and

    close it.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 3 10/23/2013

    4. Run the procedure that you just have created and verify the result of the execution in the Operator

    Navigator.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 4 10/23/2013

    5. Check the sequence object in your RDBMS Database by opening the SQL Developer and expand the

    Administrator other users ( ex: ODI_TRG). Make sure you expanded the

    Administrator user. Not your schema.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 5 10/23/2013

    6. Now you create a New Sequence in ODI. Open the Designer, Click the project ta ad expand your

    project and the project folder (Ex: SampeSales_HandsOnLoads >SAMPLE_SALES_ HandsOn) then Right

    click Sequences, and then select New Sequence.

    7. In the Sequence window on your right side, provide the details like in the below screen shot and click

    Save

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 6 10/23/2013

    8. Now going to create an interface to load the Product Family table by using the Native Sequence.

    Right-click Interfaces and select New Interfaces.

    9. Enter the new interface name and select Optimization Context. Click on the Mapping Tab.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 7 10/23/2013

    10. In the Designer Navigator, in the Model tab, expand your source and target models (Ex.

    SAMPLE_SALES_APPLICATION_SRC, SAMPLE_SALES_APPLICATION_TRG).

    11. Drag the SRC_PRODUCT from SAMPLE_SALES_APPLICATION_SRC to the source area.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 8 10/23/2013

    12. Drag the TRG_PROD_FAMILY from SAMPLE_SALES_APPLICATION_TRG to the target Area. It will

    display the auto mapping popup window. Click on Yes.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 9 10/23/2013

    13. In the Target Data store area, select FAMILY_ID, and then click on the Expression Editor Icon.

    14. Expand the Project Sequence node, and then drag the sequence SEQ_FAMILY_ID to the expression

    area. Click OK then click the Flow tab.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 10 10/23/2013

    15. In the Flow tab, click the target data store Target (SAMPLE_SALES_TRG), and then set the IKM

    Selector to IKM SQL Control Append. In the Options, set FLOW_CONTROL to false, and set DELETE_ALL

    TO true. Select the Distinct Rows check box. Save your interface. When the Fix issue window appears,

    select Fix. This option enables not checking the FAMILY_ID column for not null.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 11 10/23/2013

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 12 10/23/2013

    16. Execute the newly created interface by clicking on Execution button/right-click on the interface and

    click on execute and verify the data in the target table.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 13 10/23/2013

    17. Go to the Operator navigation and check the interface status either it is completed successfully or

    not.

  • Cognizant Technology Solutions

    Cognizant Technology Solutions 14 10/23/2013

    18. to check the data in the target table. Go to the interface you have just ran (Ex: INT_11-

    1(TRG_PROD_FAMILY) , click on the Mapping Tab. Right click on the TRG_PROD_FAMILY table in the

    Target Data store and click on the data. You will see the data in the table that is loaded with sequence

    numbers.