Creating ODI Interface: Simple Transformations 2



g. Click the Controls tab. Ensure that the selected KM is CKM Oracle. The value for each Constraint should be “true”.

h. Click the Save button to save your interface.
4. Run this interface, and check the content of the TRG_REGION table.
a. Click the Execute button.



b. Click OK in the Execution window, and then click OK when the Session Started message appears.




5. In ODI Operator verify that your new interface executed  successfully:




a. In the Interface window, click the Mapping tab. Select the TRG_REGION target datastore (click the name of the datastore), right-click, and select Data. A window appears with the loaded data.

b. Verify the data, close this window, and then close your interface INT_8-2.

 6. Create an interface called INT_8-3 that loads the TRG_CITY datastore in the Oracle Sales Application model with the content of the SRC_CITY table from the HSQL Orders Application model. Ensure that flow control is activated and all constraints in the target
table are checked. You need to transform the city population values because the target table unit is “thousands of inhabitants,” whereas the source table unit is “inhabitants.”
a. If not open, select the Designer tab, click the Projects tab, and then the Interfaces node. Right-click and select New Interface.

 b. In the Interface: NEW window, enter INT_8-3, and then click the Mapping tab.

c. If not open, click the Models tab. In the tree view, expand the Oracle Sales Application model. Drag the TRG_CITY datastore from the tree view to the Target Datastore zone.
The datastore appears in this zone.




d. Expand the HSQL Orders Application model and drag the SRC_CITY datastore from the model tree to the Sources zone of your diagram. Click Yes to perform Automatic Mapping.






e. Select the POPULATION column in the target datastore.


f. In the Mapping Properties section of the Property Inspector, in the Implementation tab, edit the expression to populate the POPULATION column with the number of thousands of inhabitants rounded to the nearest thousand. Edit the expression to have the following: FLOOR(SRC_CITY.POPULATION/1000)
Note: You use the FLOOR function to perform rounding.


g. To verify the expression, click Check the Expression in the RDBMS button . Click
OK.

h. Click the Flow tab. Click the box labeled Target (ORACLE_ORCL_LOCAL). In the Target Properties, scroll down the IKM option list to FLOW_CONTROL, and ensure that it is set to “true”.

 i. Click the Controls tab. Ensure that the selected CKM is CKM Oracle. The value for each Constraint should be “true”. Click the Save button to save your interface. Close your interface editor tab.

7. Run this interface, and check the content of the TRG_CITY table.
a. In the Designer Projects tab, right-click interface INT_8-3, and then select Execute.

 

 b. Click OK in the Execution window, and then click OK when the “Session started” message appears.


 

 c. Open the Operator Navigator and verify that your interface session executed successfully:
Note: In Operator, you may need to click the Refresh button
 

 d. In the Designer Navigator, open the Models tab. In the Oracle Sales Application model, right-click the TRG_CITY datastore and select the Data option. A window  appears with the loaded data. Scroll down and view the total number of loaded records and loaded data.
 
 


 e. Verify the data, and then close this window.
Note: The POPULATION column should show thousands of inhabitants.

No comments:

Post a Comment