Using Temporary ODI Interfaces 3

 q. Drag again the column AMOUNT from the SRC_ORDER_LINES source datastore to the Target area. Edit the mapping expression to read SUM(SRC_ORDER_LINES.AMOUNT). Rename this column SUM_AMOUNT.


 r. Drag the column PRODUCT_ID from the  SRC_ORDER_LINES source datastore to the Target area.


 s. In the Target datastore, click the SUM_AMOUNT column. In the Execute on section,select Staging Area. Repeat this step for all the other columns that have a function in mapping expression. Refer to the following table to verify the execution location. Your
Target datastore should now look as shown in the screen. Click the Flow tab.



Column                                Execution Location
SUM_AMOUNT                     Staging Area
AVG_AMOUNT                      Staging Area
CUST_ID                                   Source
CUST_NAME                               Source
FIRST_ORDER_DATE              Staging Area
FIRST_ORDER_ID               Staging Area
LAST_ORDER_DATE           Staging Area
LAST_ORDER_ID               Staging Area
PRODUCT_ID                       Source
QTY                                    Staging Area

 
 
 t. Verify the flow, and then save your temporary interface. Verify that your temporary interface appeared in the tree view. Close your interface tab. Note the color of your newly created temporary interface in the objects tree view.

2. Create a new interface, which uses the newly created temporary interface as a source.
a. In the HandsOnLoads project, start creating a new ODI interface, INT_12-1-2, as shown next. In the Optimization Context field, select Development. Open the Mapping tab.



 
b. Drag the temporary interface, INT_12-1, from the Projects tab to the Source area.

c. Drag the datastore TRG_SALES from the Oracle Sales Application model to the Target Datastore area. Click Yes to perform automatic mapping.





d. In the Target Datastore, select the FIRST_ORD_DATE column. Drag the FIRST_ORDER_DATE column from the temporary interface in the source area to the Implementation tab in the Mapping Properties area.




e. Repeat the previous step to map columns FIRST_ORDER_ID, LAST_ORDER_ID, and LAST_ORDER_DATE to the corresponding columns in the temporary interface in the
Source area. Map AMOUNT to SUM_AMOUNT,  PROD_AVG_PRICE to the AVG_AMOUNT column in the temporary interface, as shown below.



f. In the Source panel, click INT_12-1 (TEMP_AGG_ORDERS), scroll down to the Source Properties section, and then select the Use Temporary Interface as Derived Table (Sub-Select) check box.




g. To view data derived from the temporary interface, right-click the temporary interface and select Data. Close the Data Editor window.



No comments:

Post a Comment