ODI11g - Day 3 - Course 3
-
Upload
chirita-alexandra -
Category
Documents
-
view
18 -
download
1
description
Transcript of ODI11g - Day 3 - Course 3
![Page 1: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/1.jpg)
Oracle Data Integrator
InfoStart 2015
![Page 2: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/2.jpg)
INTERFACESLoad TRG_CUSTOMER
Some data we need are located in two flat files
![Page 3: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/3.jpg)
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
![Page 4: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/4.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
1 – directory path
2 – Save 3 – Save
![Page 5: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/5.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Create a new logical schema
![Page 6: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/6.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Connect logical schema with physical schema, give a name, then save.
![Page 7: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/7.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define the topology
Create a new model for the file technology. Fill all fields under Definition tab.
Save.
![Page 8: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/8.jpg)
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.
![Page 9: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/9.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Set the fields in the Definition tab as shown
![Page 10: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/10.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Set the fields in the Files tab as shown.
Save your work
![Page 11: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/11.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
By clicking the Reverse Engineer button now, we get a popup window showing the file content.
![Page 12: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/12.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER. Define Models and Datastores
Click at the end of each field on the ruler to delimit the bounds.
![Page 13: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/13.jpg)
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
![Page 14: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/14.jpg)
INTERFACESINTERFACESLoad TRG_CUSTOMER
We're ready to design our interface now
![Page 15: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/15.jpg)
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.
![Page 16: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/16.jpg)
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
![Page 17: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/17.jpg)
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
![Page 18: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/18.jpg)
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.
![Page 19: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/19.jpg)
We use this LKM
INTERFACESINTERFACESLoad TRG_CUSTOMER
![Page 20: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/20.jpg)
1 – Click here
2
INTERFACESINTERFACESLoad TRG_CUSTOMER
![Page 21: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/21.jpg)
- Click here- Set the IKM- Save your work
INTERFACESINTERFACESLoad TRG_CUSTOMER
![Page 22: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/22.jpg)
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
![Page 23: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/23.jpg)
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Click on DEAR column then use the editor to build the business rule
![Page 24: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/24.jpg)
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
![Page 25: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/25.jpg)
You can check the sintactic correctness of the statement by clicking here
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
![Page 26: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/26.jpg)
Flag only the Update check box for the column DEAR and UPD_DATE.
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
![Page 27: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/27.jpg)
INTERFACESINTERFACESUpdate Dear in TRG_CUSTOMER
Select the KMIKM Oracle Incleental Update we imported before and set the Flow Control to False.
Save your work.
![Page 28: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/28.jpg)
INTERFACESINTERFACESLoad TRG_SALES
Finally we load the fact table
![Page 29: ODI11g - Day 3 - Course 3](https://reader036.fdocuments.in/reader036/viewer/2022081503/55cf8e32550346703b8f9189/html5/thumbnails/29.jpg)
INTERFACESINTERFACESLoad TRG_SALES
Here's the interface.Notice that ODI automatically detects the GROUP BY clause, there's no need to specify it.