4 Oracle Data Integrator First Project Simple Transformations

  • Slides: 33
Download presentation
4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3

4 Oracle Data Integrator First Project – Simple Transformations: One source, one target 3 -1

Objectives After completing this lesson, you will know how to: • • 3 -2

Objectives After completing this lesson, you will know how to: • • 3 -2 Create a first, basic interface Create a filter Select a Knowledge Module and set the options Understand the generated code in the Operator Interface

Which KMs for What Flow? • When processing happens between two data servers, a

Which KMs for What Flow? • When processing happens between two data servers, a data transfer KM is required. • Before integration (Source Staging Area) • Requires an LKM, which is always multi-technology • At integration (Staging Area Target) • Requires a multi-technology IKM • When processing happens within a data server, it is entirely performed by the server. • A single-technology IKM is required. • No data transfer is performed 4 -3

More on KMs • KMs can skip certain operations • Unnecessary temporary tables will

More on KMs • KMs can skip certain operations • Unnecessary temporary tables will not be created • Some KMs lack certain features • Multi-technology IKMs can not perform Flow control • IKMs to File, JMS, etc do not support Static control • All KMs have configurable Options 4 -4

How to a Specify an LKM 1. 2. Go to the interface’s Flow tab.

How to a Specify an LKM 1. 2. Go to the interface’s Flow tab. Select the Source Set from which data will be extracted. ü 3. 4. 5. 4 -5 The KM property panel opens. Change the Name of the Source Set (optional) Select an LKM. Modify the LKM’s Options.

Note – Default KMs a s e s oo h c I D O

Note – Default KMs a s e s oo h c I D O M K t l u e. l b i defa s s o p r e v where in s r a e p p a t g l a u a f A fl e d a f i w o l f f i r e o h t ) (X d e s u ). KM is X ( t e ss i M K no 4 -6

How to Specify an IKM 1. 2. Go to the interface’s Flow tab. Select

How to Specify an IKM 1. 2. Go to the interface’s Flow tab. Select the Target. ü 3. 4. 5. 4 -7 The KM property panel opens. Check/Uncheck Distinct Rows. Select an IKM. Set the IKM’s Options.

Common KM Options The following options appear in most KMs: INSERT UPDATE Should data

Common KM Options The following options appear in most KMs: INSERT UPDATE Should data be inserted/updated in the target? COMMIT Should the interface commit the insert/updates? If “no”, a transaction can span several interfaces. FLOW CONTROL STATIC CONTROL TRUNCATE DELETE ALL DELETE TEMPORARY OBJECTS 4 -8 Should data in the flow be checked? Should data in the target be checked after the interface? Should the target data be truncated or deleted before integration? Should temporary tables and views be deleted or kept for debugging purposes?

Interface • An Interface will define • Where the data are sent to (the

Interface • An Interface will define • Where the data are sent to (the Target) • Where the data are coming from (the Sources) • How the data are transformed from the Source format to the target format (the Mappings) • How the data are physically transferred from the sources to the target (the data Flow) • Source and target are defined using Metadata imported from the databases and other systems • Mappings are expressed in SQL • Flows are defined in Templates called Knowledge Modules (KMs) 3 -9

Creating, Naming a New Interface § § § 3 -10 Interfaces are created in

Creating, Naming a New Interface § § § 3 -10 Interfaces are created in Projects To create any object in ODI, right-click on the parent node and select “Insert xyz” This is true for interfaces as well: On the project’s Interfaces entry, select Right-Click/Insert Interface.

Interfaces: The Diagram 3 -11

Interfaces: The Diagram 3 -11

Selection of Sources and Target Drag and drop the Metadata from the tree into

Selection of Sources and Target Drag and drop the Metadata from the tree into the interface to make these sources or targets Source Tables Metadata 3 -12 Target Table (single target)

Automatic Mappings ü Automatic Mapping creates mappings by matching column names automatically. ü ODI

Automatic Mappings ü Automatic Mapping creates mappings by matching column names automatically. ü ODI will prompt you before doing so: you have the option to disable this feature. 3 -13

Mappings in the Interface Target Columns (click here to open the mapping field) Mapping

Mappings in the Interface Target Columns (click here to open the mapping field) Mapping expressions (read only) Type or edit your mapping expressions here Expression Editor button 3 -14

Using the Expression Editor 1. Click the expression editor button ( ) in the

Using the Expression Editor 1. Click the expression editor button ( ) in the mapping window 2. Build your SQL expressions from the SQL help at the bottom, and from the Columns at the left 3 -15

Note ly n o e c fa r e t n i le g

Note ly n o e c fa r e t n i le g n An i s a s e t a. e r popul o t s ta a d t e targ e t a l u p s, To po t e g r a t l a r e l v a r se e v e s d e e n you. s e c a f inter 3 -16

Valid Mapping Types The following type of clauses may be used in the mappings:

Valid Mapping Types The following type of clauses may be used in the mappings: Value String values should be enclosed in single quotes: ‘SQL', '5‘ but 10. 3 Source Column Drag and drop the column or use the expression editor. It is prefixed by the datastore’s alias. E. g. : SRC_SALES. PROD_ID DBMS Function Use the expression editor for the list of supported functions and operators DBMS Aggregate MAX(), MIN(), etc. ODI automatically generates the GROUP BY clause. Any combination of clauses is allowed: Combination 3 -17 SRC_SALES_PERSON. FIRST_NAME || ' ' || UCASE(SRC_SALES_PERSON. LAST_NAME)

Filtering Data Drag and drop a column on the background area Then type the

Filtering Data Drag and drop a column on the background area Then type the filter expression Check expression. SQL filter expression Execution location 3 -18 Expression editor Save expression

Saving the Interface • • • Click the Apply button to save the interface

Saving the Interface • • • Click the Apply button to save the interface You can press the OK button to save and close the interface. The Cancel button closes the interface without saving it. ü Interfaces are saved in the Work Repository. 3 -19

Interfaces: The Flow 3 -20

Interfaces: The Flow 3 -20

Graphical Representation of the Flow • Source and target systems are graphically represented in

Graphical Representation of the Flow • Source and target systems are graphically represented in the Flow tab • This is where KM are chosen, and KM options are set 3 -21

KM and KM Options Click on the caption to display Loading KM choices and

KM and KM Options Click on the caption to display Loading KM choices and options Select the appropriate KM Set the option values as needed 3 -22 Click on the caption to display the Integration KM choices and options

Interfaces: Execution 3 -23

Interfaces: Execution 3 -23

Requirements • To run an interface, you need at least the following: • A

Requirements • To run an interface, you need at least the following: • A target table • An Integration Knowledge Module (selected in the Flow tab) • A Loading Knowledge Module if there is a remote source. • If you have all the prerequisites, you are ready to execute the interface. 3 -24

Running an Interface • Simply click the Execute button 3 -25

Running an Interface • Simply click the Execute button 3 -25

Follow-up of the Execution: Logs and Generated Code 3 -26

Follow-up of the Execution: Logs and Generated Code 3 -26

Code Generation • When we ask ODI to Execute the transformations, ODI will generate

Code Generation • When we ask ODI to Execute the transformations, ODI will generate the necessary code for the execution (usually SQL code) • The code is stored in the repository • The execution details are available in the Operator Interface: • Statistics about the jobs (duration, number of records processed, inserted, updated, deleted) • Actual code that was generated and executed by the database • Error codes and error messages returned by the databases if any 3 -27

The Operator Interface • Start the operator interface from the Windows menu or from

The Operator Interface • Start the operator interface from the Windows menu or from the ODI toolbar 3 -28

Refresh the Logs Display • By default, ODI will not refresh the logs. There

Refresh the Logs Display • By default, ODI will not refresh the logs. There are two ways to refresh the logs: • Manual refresh: click on this icon in the toolbar: • Automatic refresh: Set the refresh rate (in seconds) in the toolbar and click on this icon in the toolbar: 3 -29

Multiple Levels of Details Job level details Specific step in the job Actual code

Multiple Levels of Details Job level details Specific step in the job Actual code sent to the systems (SQL or other) 3 -30

Errors Reporting • The red icon in the tree indicates the steps that failed

Errors Reporting • The red icon in the tree indicates the steps that failed • Error Codes and Error Messages are reported at all levels 3 -31

Information Available for each Level Time Information Statistical Information Generated Code 3 -32

Information Available for each Level Time Information Statistical Information Generated Code 3 -32

Understanding the Operator Icons Running Success Failure Warning Waiting to be executed Queued by

Understanding the Operator Icons Running Success Failure Warning Waiting to be executed Queued by the agent` 3 -33