Creating ODI Interface: Simple Transformations 1

After the models are defined and the quality of the data is verified, you need to create an ODI Interface to perform transformations. In this practice, you create simple interfaces with one target table and a single source. You will run these interfaces and check the execution.In this practice, you create three interfaces. First, you create an interface called INT_8-1,loading the TRG_COUNTRY datastore in the Oracle Sales Application model with the content of
the SRC_REGION table from the HSQL Orders Application model. This simple interface has no transformations.
The second interface, INT_8-2, is a duplicate of INT_8-1, to which flow control is activated,and constraints in the target table are checked.The third interface, INT_8-3, loads the TRG_COUNTRY datastore in the Oracle Sales Application model with the content of the SRC_CITY table from the HSQL Orders Application
model. In this interface, flow control is activated, constraints in the target table are checked,and city population values are transformed from individual to times 1,000.
Note: Completing this practice is critical for other practice  sessions.
Your Tasks:
1. Create an interface called INT_8-1, loading the TRG_COUNTRY datastore in the Oracle Sales Application model with the content of the SRC_REGION table from the HSQL Orders
Application model. You must map the columns of the same name without any transformation. Ensure that you take only distinct records.
a. In Designer, click the Projects tab, and expand the Hands On Loads project. Expand the HandsOn folder. Select the Interfaces node, right-click, and select the New Interface option.


b. In the Interface window, enter INT_8-1 as the name of the interface. Ensure that the Optimization Context is Global. Click the Mapping tab.


c. In the Designer Navigator to the left, click the Models tab. In the tree view, expand the Oracle Sales Application model. Drag the TRG_COUNTRY datastore from the tree view to the Target Datastore zone (see the following screen: the panel to the right of
the panel with text stating “Drag datastores…. as sources for this dataset”). The datastore appears in this zone.



d. Expand the HSQL Orders Application model and drag the SRC_REGION datastore from the model tree to the Sources zone of your diagram (the panel to the left of the target panel). An Automap dialog box appears. Click Yes. Now the system
automatically maps fields in the source and target datastores.





e. Click the Flow tab. After the flow diagram initializes, you may want to use the zoom-out button to see all the objects in the diagram. Click the box for Target + Staging Area that
is labeled Target (ORACLE_ORCL_LOCAL), and then in the Target Properties panel, select the Distinct Rows check box. If open, click the button to minimize the Messages log. Your screen now looks as shown here.
Note: Confirm that the Distinct Rows check box is selected.



f. Click the Save button to save your interface. If the Locking Object window appears, select “Don’t show this window next time,” and click Yes.


2. Run this interface, and check the content of the TRG_COUNTRY table.
a. Expand the Interfaces node, right-click the newly created interface INT_8-1, and then select Execute.


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



c. Click the Operator tab to open the ODI Operator Navigator. The Operator window appears.
Note: In Operator, you may need to click the Refresh button to view the new session.
d. In the Session List tab, expand the All Executions node. The session called “INT_8-1” should appear complete. Expand this session in the tree view as shown:


e. In your interface window, click the Mapping tab. In Target datastore –TRG_COUNTRY, right-click COUNTRY, and then select Data.



f. A window appears with the loaded data.


g. Verify your data and close this window. Close INT_8-1 tab. If the Unlocking Object window appears, select “Don’t show this window next time” check box and click Yes.
3. Create an interface called INT_8-2 that loads the TRG_REGION datastore in the Oracle Sales Application model with the content of the SRC_REGION table from the Orders Application–HSQL model. You must map the columns of the same name without any
transformation. Ensure that flow control is activated and all constraints in the target table are checked.
Note: Because this new interface uses the same source as the previous one, you will duplicate it.
a. Select the Designer tab. If not open, click the Projects tab and select the INT_8.1 interface. Right-click and select Duplicate Selection, and then click Yes in the confirmation box. A copy of your interface appears.


b. Double-click the interface Copy of INT_8.1 to edit it.

c. In the Name field, change the name to INT_8-2 and then click the Mapping tab.


d. Click the “perform layout” button to customize the view of the Source zone. In the Confirmation window, click Yes.


e. In the Designer, click the Models tab, and then drag the TRG_REGION datastore from the Oracle Sales Application model to the Target Datastore zone. Leave the source datastore unchanged. Click Yes to perform automatic mapping.




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


No comments:

Post a Comment