odi11g - day 3 - course 3
DESCRIPTION
Invatat ODITRANSCRIPT
Oracle Data Integrator
InfoStart 2015
INTERFACESLoad TRG_CUSTOMER
Some data we need are located in two flat files
INTERFACESLoad TRG_CUSTOMER. Define the topology
Let's define the topology for the flat files.Under the File technology there's already a data server named FILE_GENERIC.
Let's create a new physical schema
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
1 – directory path
2 – Save 3 – Save
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Create a new logical schema
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Connect logical schema with physical schema, give a name, then save.
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Create a new model for the file technology. Fill all fields under Definition tab.
Save.
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Let's create a datastore for SRC_SALES_PERSON.txt
The file is fixed format and has no header.
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Set the fields in the Definition tab as shown
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Set the fields in the Files tab as shown.
Save your work
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
By clicking the Reverse Engineer button now, we get a popup window showing the file content.
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Click at the end of each field on the ruler to delimit the bounds.
Click on each column then set its name and datatype.ATTENTION: Click on the field name, not on the ruler.Give to all fields the String datatype, for simplicity.Click OK then Save your work.
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
INTERFACESINTERFACESLoad TRG_CUSTOMER
We're ready to design our interface now
INTERFACESINTERFACESLoad TRG_CUSTOMER
Drag all needed datastores in the interface editor, click Yes to perform the automatic mapping on the columns having the same name.
To perform the join between SRC_CUSTOMER.SALES_PERS_ID and SRC_SALES_PERSON.SALES_PERS_ID simply drag one columnover the other one.
INTERFACESINTERFACESLoad TRG_CUSTOMER
INTERFACESINTERFACESLoad TRG_CUSTOMER
Click on each target field and set the mapping as shown.To set a source column as mapping in the target, simply drag the source column into the target mapping
INTERFACESINTERFACESLoad TRG_CUSTOMER
Click on Flow tab.Click here.As we can see, a Loading phase is required to store the file in a temporary table.To perform a Loading phase, ODI needs a Loading Knowledge Module (LKM).Of course it must be imported into the project.
We use this LKM
INTERFACESINTERFACESLoad TRG_CUSTOMER
1 – Click here
2
INTERFACESINTERFACESLoad TRG_CUSTOMER
- Click here- Set the IKM- Save your work
INTERFACESINTERFACESLoad TRG_CUSTOMER
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Create a new interface.Use TRG_CUSTOMER as source and as target datastoreDon't perform any automatic mapping
Drag CUST_ID into the target. Notice that it will be the update key (WHERE condition in update statement), since it's already a primary key
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Click on DEAR column then use the editor to build the business rule
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
To get the column name in the editor, double click here or drag the column into the right pane.
Click OK
You can check the sintactic correctness of the statement by clicking here
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Flag only the Update check box for the column DEAR and UPD_DATE.
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Select the KMIKM Oracle Incleental Update we imported before and set the Flow Control to False.
Save your work.
INTERFACESINTERFACESLoad TRG_SALES
Finally we load the fact table
INTERFACESINTERFACESLoad TRG_SALES
Here's the interface.Notice that ODI automatically detects the GROUP BY clause, there's no need to specify it.