oracle data integrator 11g advanced integration and...

Download Oracle Data Integrator 11g Advanced Integration and ...dbmanagement.info/Books/MIX/D78191GC10_ag_Oracle_Data_integrat… · Oracle Data Integrator 11g: Advanced Integration and Development

If you can't read please download the document

Upload: haanh

Post on 06-Feb-2018

249 views

Category:

Documents


6 download

TRANSCRIPT

  • Oracle Data Integrator 11g: Advanced Integration and Development Activity Guide

    D78191GC10 Edition 1.0 February 2013 D80590

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved. Disclaimer This document contains proprietary information and is protected by copyright and other intellectual property laws. You may copy and print this document solely for your own use in an Oracle training course. The document may not be modified or altered in any way. Except where your use constitutes "fair use" under copyright law, you may not use, share, download, upload, copy, print, display, perform, reproduce, publish, license, post, transmit, or distribute this document in whole or in part without the express authorization of Oracle. The information contained in this document is subject to change without notice. If you find any problems in the document, please report them in writing to: Oracle University, 500 Oracle Parkway, Redwood Shores, California 94065 USA. This document is not warranted to be error-free. Restricted Rights Notice If this documentation is delivered to the United States Government or anyone using the documentation on behalf of the United States Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS The U.S. Governments rights to use, modify, reproduce, release, perform, display, or disclose these training materials are restricted by the terms of the applicable Oracle license agreement and/or the applicable U.S. Government contract. Trademark Notice Oracle and Java are registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.

    Author Viktor Tchemodanov

    Technical Contributors and Reviewers Denis Gray, Alex Kotopoulis, Julien Testut, Christophe Dupupet, Rebecca Sly, Gerry Jurrens, Sophia Chen, Vishal Parashar, Richard Green

    This book was published using: Oracle Tutor

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Oracle Data Integrator 11g: Advanced Integration and Development Table of Contents iii

    Table of Contents

    Practices for Lesson 1: Introduction ........................................................................................................ 1-1 Practices for Lesson 1: Overview ............................................................................................................. 1-2 Practice 1-1: Exploring Your Environment ................................................................................................ 1-3

    Practices for Lesson 2: Overview of ODI Knowledge Modules ................................................................ 2-1 Practices for Lesson 2: Overview ............................................................................................................. 2-2 Practice 2-1: Developing and Enhancing an Integration Knowledge Module .............................................. 2-3

    Practices for Lesson 3: Developing Knowledge Modules........................................................................ 3-1 Practices for Lesson 3: Overview ............................................................................................................. 3-2 Practice 3-1: Creating a New KM for Data Generation .............................................................................. 3-3

    Practices for Lesson 4: Designing ODI Integration Interfaces ................................................................. 4-1 Practices for Lesson 4: Overview ............................................................................................................. 4-2 Practice 4-1: Creating an ODI Interface for XML to Database Transformation with ODI Constraint and Error Recycling ................................................................................................................................................ 4-3

    Practices for Lesson 5: Designing Advanced Integration Interfaces ...................................................... 5-1 Practices for Lesson 5: Overview ............................................................................................................. 5-2 Practice 5-1: Implementing ODI Integration with Temporary Interfaces...................................................... 5-3

    Practices for Lesson 6: Using Variables in ODI ....................................................................................... 6-1 Practices for Lesson 6: Overview ............................................................................................................. 6-2 Practice 6-1: Using Variables in ODI Package .......................................................................................... 6-3 Practice 6-2: Using an ODI Variable as a Startup Parameter .................................................................... 6-22

    Practices for Lesson 7: Accelerating Development in ODI with Groovy ................................................. 7-1 Practices for Lesson 7: Overview ............................................................................................................. 7-2 Practice 7-1: Automating ODI Tasks with Groovy ..................................................................................... 7-3

    Practices for Lesson 8: Working with Complex Files in ODI ................................................................... 8-1 Practices for Lesson 8: Overview ............................................................................................................. 8-2 Practice 8-1: Configuring ODI Topology and ODI Model with Complex Files.............................................. 8-3

    Practices for Lesson 9: Integration of ODI in Enterprise Environment and SOA .................................... 9-1 Practices for Lesson 9: Overview ............................................................................................................. 9-2 Practice 9-1: Integrating ODI in the Enterprise Environment ..................................................................... 9-3 Practice 9-2: Exposing an ODI Scenario as a Web Service....................................................................... 9-17 Practice 9-3: Integrating ODI with a BPEL process Within SOA ................................................................ 9-30

    Practices for Lesson 10: Enhancing ODI Security ................................................................................... 10-1 Practices for Lesson 10: Overview ........................................................................................................... 10-2 Practice 10-1: Implementing ODI External User Authentication ................................................................. 10-3

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 1

    Practices for Lesson 1: Introduction Chapter 1

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 2

    Practices for Lesson 1: Overview

    Practices Overview In this practice, you will explore the technical environment for your practices and start the ODI studio.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 3

    Practice 1-1: Exploring Your Environment

    Overview In this practice, you examine the technical setup for these practices, start up, and connect to the ODI Studio.

    Assumptions None

    Tasks 1. View the major software components installed in your system. These components are

    shown in the picture. Your environment has the following major components: Oracle Database 11gR1 (11.1.0.7.0) Oracle Data Integrator 11gR1 (11.1.1.6) Oracle WebLogic Server (10.3.6) Oracle SOA Suite (11.1.1.6) Oracle Internet Directory (11.1.1.6.0)

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 4

    2. View the desktop of your machine. Note the following shortcuts: a. ODI Studio: Starts ODI Studio

    b. SQL Developer: Starts SQL Developer, which provides access to the objects in Oracle

    Database 11gR1 with GUI

    c. JDeveloper: Starts JDeveloper, which simplifies working with projects and deploying

    to the application server (WebLogic)

    d. Start WLS_SOA_ODI_domain: This shortcut starts the WebLogic admin server in

    SOA-ODI_domain. This domain has been predefined for these practices.

    3. Navigate to the C:\Labs folder.

    a. View this folders content. The Files folder contains some files that will be used for your practices.

    b. Note the folder named ResetPractice. This folder contains the scripts for resetting practices in the course. You will use these scripts at the beginning of each practice. These scripts are also useful when you feel that you need to restore a particular practice environment and begin your practice from scratch. Close your folder window. Note: These scripts are available for most, but not every practice of the course. Consult your instructor for details.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 5

    4. Start Oracle Data Integrator and log in to ODI Studio. Start your demo source environment.

    Step Screen/Page Description Choices or Values

    a. MS Windows Start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data Integrator > ODI Studio.

    b. Oracle Data Integrator Click Connect to Repository. The Login Name is DEV_ODI_REPO. You log in with the username SUPERVISOR and password SUNOPSIS. Click OK.

    c. Oracle Data Integrator In ODI Studio, open the Designer tab. Open the Projects and Models tabs. Verify your environment with the screenshot provided.

    d. Oracle Data Integrator Start the Demo environment: Start > Programs > Oracle > Oracle Data Integrator > Shortcut to startdemo. Verify that three command windows are added to the taskbar. You will need to have these programs running. Do not close these windows until the end of all practices.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 6

    a.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 7

    b.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 8

    c.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 9

    d.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 1: Introduction Chapter 1 - Page 10

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 1

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 2

    Practices for Lesson 2: Overview

    Practices Overview In Practice 2-1, you duplicate an existing knowledge module and modify the duplicate knowledge module to enhance it with substitution methods.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 3

    Practice 2-1: Developing and Enhancing an Integration Knowledge Module

    Overview In some cases, you may need to create a new knowledge module (KM) to use with an integration interface. That would provide additional functionality of your interface. In this practice, you duplicate an existing KM, IKM SQL Incremental Update, naming the new KM as IKM Oracle UI-Audit. You add two commands, Create Audit Table and Insert Audit Records, to the KM by using substitution methods. To test your newly created KM, you duplicate an existing interface, naming the new interface as INT-INT-SALES_PERSON-AUDIT. You change the new interfaces IKM selection to use the new KM you just created in the previous practice, IKM Oracle UI-Audit. You execute the INT-SALES_PERSON-AUDIT interface and examine the audit table created by your KM. You also make additional enhancements of the KM created in the previous practice. You create an option for your new KM to enable an end user to choose when to generate audits. You link this option to the steps in the KM, and test your modified interface.

    Your Tasks 1. Reset your practice environment.

    a. Verify that ODI Studio and SQL developer are not running. If they are running, close ODI Studio and SQL Developer.

    b. Start the command utility and change the directory to the following folder: C:\Labs\ResetPractice\reset_2

    O

    racl

    e U

    nive

    rsity

    and

    (Ora

    cle

    Cor

    pora

    tion)

    use

    onl

    y.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 4

    c. Execute the resetRepo.bat command. Press Enter when prompted. Verify that this command is executed successfully as shown in the following screenshot.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 5

    2. Create the new KM with new functionality to create an audit table and insert audit records. a. If not started, start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data

    Integrator > ODI Studio. If not connected, connect to the DEV_ODI_REPO Work Repository (username: SUPERVISOR; password: SUNOPSIS). Click the Designer tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 6

    b. Open ODI Designer and click the Projects tab. Select Projects > Export Files >

    Knowledge Modules > Integration (IKM). Right-click IKM SQL Incremental Update and select Duplicate Selection. In the window that follows, click Yes.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 7

    Double-click Copy of IKM SQL Incremental Update to edit it. Rename this KM IKM SQL Incremental Update Audit Options. Click the Details tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 8

    c. On the Details screen, review the commands in the current KM. Select Insert new

    rows and then click the Add icon to add the new command.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 9

    d. Name this command Create Audit Table. Select the Ignore Errors check box. In the Command on Target tab, set the Technology to Oracle. Enter the following command to create the audit table. Verify that the check boxes in the Journalizing section are not selected. If necessary, deselect them. Note: This command creates the Audit table with three columns: the primary key column (SALES_PERSON_ID), AUDIT_DATE, and AUDIT_INDICATOR. Note: For this command, refer to the C:\Labs\Files\Text\P2-1.txt file.

    create table _H

    (

    ,

    AUDIT_DATE DATE,

    AUDIT_INDICATOR VARCHAR2(1)

    )

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 10

    e. Click the Details tab. If necessary, scroll down, and then select the Create Audit

    Table command. Click the icon four times to move the command up and place it right after the Insert new rows step (150), as shown below. Verify that the Ignore Errors check box is selected for your new Create Audit Table command.

    f. With the Create Audit Table command still selected, click the Add icon again. Create the command that inserts audit records in the audit table, as shown below. This command uses the following substitution methods: odiRef.getTable and odiRef.getColList. Name this command Insert Audit Records. Select the Ignore Errors check box. In the Command on Target tab, set the Technology to Oracle. The command is provided below.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 11

    Insert into _H

    (

    ,

    AUDIT_DATE,

    AUDIT_INDICATOR

    )

    select ,

    sysdate,

    IND_UPDATE

    from

    Note: For this command, refer to the C:\Labs\Files\Text\P2-1.txt file. Note: In these substitution methods, you use the following parameters: GetTable:

    L: Local naming convention. For example, in Oracle that would be schema.table (versus R for remote: schema.table@server).

    A: Automatic. It enables ODI to determine which physical schema to use (the Data schema [D] or the Staging schema [W]).

    Notice the PK parameter. If it is used, only the columns that are part of the primary key are included.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 12

    `

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 13

    g. Click the Details tab. Scroll down and select the Insert Audit Records command.

    Click the icon four times to move the command up and place it right after the Create Audit Table step, as shown in the next screen. Click Save and then close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 14

    h. Click the Save button, and close the editor. Verify that your new KM, IKM SQL Incremental Update Audit Options, appears in the Knowledge Modules tree.

    3. You will create a modified copy of the INT-TRG_SALES_PERSON interface, to execute with your newly created KM. You will need to duplicate the existing interface, rename it, and then change the IKM entry to use your new IKM SQL Incremental Update Audit Options. a. On the Projects tab, expand the project Export Files, expand First Folder > Interfaces,

    right-click the INT-TRG_SALES_PERSON interface and select Duplicate Selection. Click Yes on the Confirmation screen.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 15

    b. Double-click the Copy of INT-TRG_SALES_PERSON interface. Change the name of

    the interface to INT-TRG_SALES_PERSON-Audit, as shown in the screenshot. Click the Flow tab.

    On the Flow tab, click Target (ODI_STAGE) in the diagram to open the Target Area Property Inspector below the diagram. In the IKM Selector drop box, select IKM SQL Incremental Update Audit Options. Note: You may have to make sure that the lower section of the editor is shown before working with the Target Area Property Inspector pane.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 16

    c. Ensure that in the Options list, FLOW_CONTROL and STATIC_CONTROL options are set to false, as shown in the screenshot. Click the Save button and then close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 17

    To execute your new interface, select the interface and click the Execute button . Click OK. Click OK again in the Information window to start the execution.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 18

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 19

    d. Click the Operator tab to open ODI Operator. Click to open the All Executions node. If

    necessary, click the Refresh icon , find your new interface session, and view the session steps.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 20

    e. Scroll down and double-click the Create Audit Table step (13). View the content of the Definition and Code tabs for this step. Close the tab. Note: You may have warning status for this Session task if the Audit table already exists in your system. Ignore this warning.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 21

    f. Similarly, view the Insert Audit Records step information. Refer to the following screens. Click Close.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 22

    g. On the Desktop, double-click the shortcut to start Oracle SQL Developer. When SQL developer is started, click to expand the ORCL connection. Connect with the username System and password oracle1. Expand Other Users > ODI_STAGE > Tables connection (for the password, enter ODI_STAGE). Select the Tables (Filtered) node

    and if necessary, click the Refresh button . Click the Audit table TRG_SALES_PERSON_H, click the Data tab, and verify that your Audit table was created and populated with audit records, as shown next.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 23

    Create an option for your newly created KM to enable an end user to choose when to

    generate audits. h. In Designer, click the Projects tab, right-click IKM Oracle UI Audit Options, and

    select New Option. Name this option as AUDIT, set Type to Check Box, and Default Value to true. Click Save and close the AUDIT option tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 24

    i. Now, you need to link this option to your steps in the KM. Double-click IKM SQL

    Incremental Update Audit Options, and click the Details tab. Double-click your new step, Create Audit Table, to edit it. Scroll to the bottom and click the Options plus sign [+] to show its contents.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 25

    j. Deselect the Always Execute check box. Select AUDIT. This will condition the

    execution of these steps with the value set by the end user. Click Save. Click the Details tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 26

    k. Repeat the previous step for the Insert Audit Records command, as shown in the following screens. Click Save to save your KM and close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 27

    l. Double-click the INT-TRG_SALES_PERSON-Audit interface to edit it. Click the Flow tab, click Target (ODI_STAGE), and verify that the AUDIT option is set to true.

    Execute the interface .

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 28

    m. Open ODI Operator, select All Executions, and then click the Refresh button and view the execution results. Both Create Audit Table and Insert Audit Records steps should be present.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 29

    n. In Designer, edit the INT-SALES_PERSON-Audit interface again. On the Flow tab, click Target (ODI_STAGE) and set the AUDIT option to false. Save your interface and then execute your interface again .

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 2: Overview of ODI Knowledge Modules Chapter 2 - Page 30

    o. In ODI Operator, click the Refresh button and view the execution results. The new KM steps to create and populate an audit table are not executed.

    p. Close ODI Studio. If open, close SQL Developer.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 1

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 2

    Practices for Lesson 3: Overview

    Practices Overview In Practice 3-1, you create a new knowledge module (KM) that can be used with ODI integration interfaces for generating thousands of records with random data in any table in the Oracle Database. In most cases, column names and mapping expressions do not belong to a KM. The exception would be administrative columns that you add as part of the logic of your KM. For your KM to be reusable, you need make sure that your code contains no information that physically relates your code to any particular database table structure. Your new KM is to generate a large number of records with some random data. To generate data for each record that would meet particular requirements, you use simple user functions that have been precreated for this practice. In addition, you create options for your KM to add some flexibility to your KM. With these options, you can set the number of records you want to generate. You can also set the option for creating or truncating a target table.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 3

    Practice 3-1: Creating a New KM for Data Generation

    Overview The Oracle Database provides an interesting feature that can be used to generate a large number of records the group by cube method: It returns all the possible permutations for the selected columns. For example, the following code returns 8 records (2 to the power 3): select NULL from dual group by cube(1,1,1). How about generating a table with just 1,000 records? For that, you can use the following code:

    select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1) where rownum

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 4

    Your Tasks 1. Reset your practice environment.

    a. Verify that ODI Studio and SQL developer are not running. If they are running, close ODI Studio and SQL Developer.

    b. If necessary, start the command utility and change the directory to the following folder: C:\Labs\ResetPractice\reset_3. Execute the resetRepo.bat command. Press Enter when prompted. Verify that this command is executed successfully.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 5

    2. Create your new KM. a. Start Oracle Data Integrator: Start > Programs > Oracle > Oracle Data Integrator > ODI

    Studio. If not connected, connect to the DEV_ODI_REPO Work Repository (username: SUPERVISOR; password: SUNOPSIS). Click the Designer tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 6

    b. In Designer, click the Projects tab, expand Procedures > Knowledge Modules. Right-click Integration (IKM) and select New Integration (IKM). In the Name field, enter IKM Oracle Build Sample Data. Click the Details tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 7

    c. Click Add icon to add the first step. Name this step as Drop SEED table. Select the Ignore Errors check box. In the Command area, enter drop table Note: For the commands used in this practice, you can refer to the P3-1.txt file located in the C:\Labs\Files\Text folder.

    O

    racl

    e U

    nive

    rsity

    and

    (Ora

    cle

    Cor

    pora

    tion)

    use

    onl

    y.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 8

    d. Click the Details tab. Click Add icon and then add another command to create the SEED table: create table (SEED_ID NUMERIC)

    Name this command: Create SEED table.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 9

    e. In the next step, you will populate the SEED table with records. Add the following command: insert into

    select rownum from

    (select NULL from dual group by cube(1,1,1,1,1,1,1,1,1,1))

    where rownum

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 10

    f. To create a target table, you add the following command. Select the Ignore Error check box. Name this command Create target table. Note: This command is necessary only when a target table does not exist. Click the Details tab. create table

    (

    )

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 11

    g. Add the command to truncate the target table as shown below. Name this command Truncate target table. Click the Details tab. truncate table

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 12

    h. Add the command to delete records in the target table. Name this command Delete Target table. For Log Counter, select Delete. In the Transaction field, select Transaction1. In the Commit field, select No Commit. Click the Details tab.

    delete from

    O

    racl

    e U

    nive

    rsity

    and

    (Ora

    cle

    Cor

    pora

    tion)

    use

    onl

    y.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 13

    i. Add the command to insert new rows in the target table. Set the Log Counter to Insert. In the Transaction field, select Transaction1. In the Commit field, select No Commit. Note the odiRef.getOption method. It is used to get the option for setting the number of thousands of records. insert into

    (

    )

    select

    from

    S1,

    S2

    where S2.SEED_ID

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 14

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 15

    j. Add the command to Commit the transaction: /* commit */. Name this step Commit. In the Transaction field, select Transaction1. In the Commit field, select Commit. Click the Details tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 16

    k. Add the final step to Drop the SEED table. Enter the following command: drop table

    Name this step Drop SEED table. Click the Details tab and verify the steps, which are shown in the following screenshots. Click the Save icon to save the KM and close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 17

    3. To add flexibility to your KM, you will create the options.

    a. Right-click the IKM Oracle - Build Sample Data KM and select New Option. In the Name field, enter TRUNCATE. In the Type field, select Check Box. Set the Default value to True. In the Description field, enter Truncate the target datastore. Save this option and close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 18

    b. Similarly, create another option. In the Name field, enter CREATE_TARGET_TABLE. For the Type field, select Check box. Set the Default value to False. In the Description field, enter Create Target Table. Save this option and close the tab.

    c. Create the option to control. In the Name field, enter THOUSANDS_OF_RECORDS.

    For the Type field, select Value. Set the Default value to 10. In the Description field, enter Thousands of records to generate. Save this option and close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 19

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 20

    d. Add the options to your KM steps. Open the IKM Oracle - Build Sample Data KMs for editing. Click the Details tab. Double-click Create Target table.

    e. Scroll down and select Options. Deselect the Always Execute check box and select the

    Create Target Table option. Click the Details tab.

    f. Double-click Truncate Target Table command. In the Options section, deselect Always

    Execute and select TRUNCATE. Click the Details tab. Click Save and close the tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 21

    4. You generate data and populate the SALES_SAMPLER datastore located in the Oracle_RDBMS1 model. The Oracle Database comes with a package called DBMS_RANDOM. The following functions will be used in this practice:

    RandomNumber(Min, Max): Generates a random value (without decimals) between the Min and Max values

    RandomString(Format, Min, Max): Generates a random string with a minimum of Min characters and a maximum of Max characters. The valid formats are:

    o 'u', 'U' Returning string in uppercase alpha characters

    o 'l', 'L' Returning string in lowercase alpha characters

    o 'a', 'A' Returning string in mixed case alpha characters

    o 'x', 'X' Returning string in uppercase alpha-numeric characters

    o 'p', 'P' Returning string in any printable characters

    RandomBool(): Generate a 0 or a 1

    RandomDecimal(Min, Max): Generates a random value (with decimals) between the Min and Max values

    (MinDate, MaxDate): Returns a date between MinDate and MaxDate (make sure MinDate and MaxDate are valid dates for Oracle)

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 22

    a. To import user functions in your project Procedures, right-click User Function and select Import. Navigate to C:\Labs\Files\xml_samples\UserFunctions and click Open. Select RandomBool and click OK. In the Import Report window, click Close.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 23

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 24

    b. Expand the RandomGenerators node and verify that the RandomBool function is added to the tree.

    c. Repeat the previous steps to add RandomDate, RandomDecimal, RandomNumber, and RandomString functions. Verify that these functions are added under the RandomGenerators node.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 25

    5. Create an interface to generate data in the SALES_SAMPLER datastore. a. On the Projects tab, expand Procedures > First Folder. Right-click Interfaces. Select

    New Interface. Name your interface INT_SALES_SAMPLER. Click the Mapping tab.

    b. On the Models tab, expand the Oracle_RDBMS1 model, select the SALES_SAMPLER datastore, and then drag it to the target section of the INT_SALES_SAMPLER interface.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 26

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 27

    c. In the Target datastore section, select the SAMPLER_ID column. In Mapping Properties, enter the following mapping expression on the Implementation tab: RandomNumber(1,999). Click the SAMPLER_ID column again and in the Execute on field, select Staging Area.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 28

    d. Similarly, implement mapping for each column in the Target datastore. In the Execute on field, select staging area for each column. Refer to the following table:

    Column MappingSAMPLER_ID RandomNumber(1,999)

    SAMPLER_NAME RandomString('A', 1, 30)

    SAMPLER_PROMOTION case when RandomBool()=0 then 'FALSE'else 'TRUE' end

    SAMPLER_PRICE RandomDecimal(1,10000)

    SAMPLER_RELEASE_DATE RandomDate('01-JAN-2000', sysdate)

    Note: For mapping expressions, you can refer to the P3-1.txt file located in the C:\Labs\Files\Text folder.

    Your Target datastore should look as follows:

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 29

    e. Click the Flow tab. Click the Target datastore. In the Target Properties, view and accept the default values of the options. Click the Save icon to save the interface.

    f. Click the Execute button to execute your interface. Click OK. Click OK again.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 30

    g. Click the Operator tab. Expand All executions as shown in the following and verify that the interface is executed successfully.

    .

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 31

    h. Click the Designer tab. On the Models tab, in the Oracle_RDBMS1 folder, right-click Sales_Sampler datastore and select View data.

    Verify that your target datastore is now populated with randomly generated data.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 3: Developing Knowledge Modules Chapter 3 - Page 32

    i. Close ODI Studio. If open, close SQL Developer.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 1

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 2

    Practices for Lesson 4: Overview

    Practices Overview In Practice 4-1, you perform the steps to build an ODI interface that will load an XML file with a constraint to the database table. The constraint will only allow data to be loaded where client age is >= 21. Any rows that do not pass the constraint will be loaded to the error table on the target database E_CLIENT.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 3

    Practice 4-1: Creating an ODI Interface for XML to Database Transformation with ODI Constraint and Error Recycling

    Overview In this practice, you perform the following steps: 1. Create a new model for the RDBMS table CLIENT. Define the constraint for the table. 2. Import appropriate Load Knowledge Modules (LKM), Integrate Knowledge Modules (IKM),

    and Check Knowledge Modules (CKM) into the project. 3. Create an integration interface for transformation from XML to RDBMS model. You enable

    the CKM and error recycling. 4. Test your interface and verify data.

    Your Tasks 1. Reset your practice environment.

    a. Verify that ODI Studio and SQL developer are closed. If they are running, close ODI Studio and SQL Developer.

    b. If necessary, start the command utility and change directory to the following folder: C:\Labs\ResetPractice\reset_4. Execute the following command: resetRepo.bat. Press any key when prompted. Verify that this command executed successfully.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 4

    2. Connect to ODI Studio and create a new model for the RDBMS table CLIENT: Connect to the DEV_ODI_REPO Work Repository (User: SUPERVISOR, Password:

    SUNOPSIS). Click the Designer tab.

    a. Open the Designer tab, then open the Models tab. Click New Model Folder and select

    New Model. For model name, enter Oracle_TRG. Set Technology to Oracle. Use the existing logical schema ODI_STAGE. Click the Reverse Engineer tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 5

    b. For Context, choose Development. Retain the other default settings. Save your model and close the editor.

    c. Create the CLIENT datastore within the Oracle_TRG model by copying from the XML

    model. Select and expand the XML_SRC model. Right-click the CLIENT table and select Duplicate Selection. Click Yes in the Confirmation dialog box.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 6

    d. Drag the new duplicate Copy of CLIENT from the XML_SRC model to the Oracle_TRG model. Expand the Oracle_TRG model and double-click the Copy of CLIENT datastore to edit. Change the name to CLIENT. Click Save and close the editor. Note: No physical table is created on Oracle_TRG. When the Interface is run, it creates the CLIENT physical table.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 7

    e. During the duplication of the CLIENT datastore, the constraint for the XML file was also copied. This constraint should be deleted. Expand Oracle_TRG > CLIENT > Constraints. Right-click the CITY_CLIENT CITY constraint and click Delete.

    f. You need to set up a new constraint for the CLIENT table in the RDBMS datastore

    CLIENT. To set up the ODI constraint on the CLIENT data store in Oracle_TRG model, right-click Constraints and select New Condition. Specify the parameters of the new constraint as shown in the table below. Save this constraint and close the editor.

    Parameter Value Name AgeConstraint Type Oracle Data Integrator Condition Where cast(Client.age as numeric)>=21 Message Client must be at least 21 years old

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 8

    Note: On first execution of the interface, the SQL will not validate until the table is created.

    3. Before the interface is created, the Load Knowledge Modules (LKM), Integrate Knowledge

    Modules (IKM), and Check Knowledge Modules (CKM) need to be imported into the project. To import these KMs, perform the following steps: a. Open the Projects tab and expand the Knowledge Modules node. Right-click the

    Loading (LKM) node and select Import Knowledge Modules. If not open, browse to the C:\Oracle\Middleware\Oracle_ODI1\oracledi\xml-reference folder. Select LKM SQL to Oracle. Click OK. Close the Import Report window.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 9

    b. Similarly, select the Integration (IKM) node and import IKM SQL Control Append

    Knowledge module. Select the Integration (IKM) node and import IKM SQL Control Append. Knowledge module. Expand Check (CKM) node and import CKM Oracle. Refer to the screenshots below.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 10

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 11

    c. Create a new interface INT_LOAD_TBL_CLIENT. Set the Optimization context to

    Development, and then click the Mapping tab.

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t

    he e

    xpre

    ss p

    urpo

    se S

    ELF

    STU

    DY.

    SH

    ARIN

    G T

    HE

    FILE

    IS S

    TRIC

    TLY

    PRO

    HIB

    ITED

    .

  • Copyright 2013, Oracle and/or its affiliates. All rights reserved.

    Practices for Lesson 4: Designing ODI Integration Interfaces Chapter 4 - Page 12

    Ora

    cle

    Uni

    vers

    ity a

    nd (O

    racl

    e C

    orpo

    ratio

    n) u

    se o

    nly.

    Thes

    e eK

    it m

    ater

    ials

    are

    to b

    e us

    ed O

    NLY

    by

    you

    for t