Sorting in ODI 11G
- It is equal to ORDER BY clause in SQL
- it is available as a component in ODI 12 C
STEP 1 : Creating and Reverse Engineering Source
- We can use EMP table of SCOTT schema as Source
STEP 2 : Creating and Reverse Engineering Target
- Duplicate EMP data store and rename as TGT_EMP_SORT
- Drag and drop into Target Model
STEP 3 : Change KM
- Duplicate the existing KM IKM SQL Control Append
- Rename as IKM SQL CONTROL APPEND SORT
- Open this KM → Select Details → Double Click on Insert New Rows → end of the code add below code
<%=odiRef.getOption("ORDER_BY")%>
|
- Right Click on IKM SQL CONTROL APPEND → Select New Option
- Provide name and type as shown → save and close the KM
STEP 4 : Creating Interface/Mapping
- Create interface with the name of m_SORT_IN_ODI11G
- Click on mapping tab → Drag and drop source EMP and target TGT_EMP_SORT in respective locations
- Click on Flow tab
- Select Target and select IKM SQL Control Append Sort → Change options
- ORDER_BY : ORDER BY DEPTNO ,SAL
- FLOW_CONTROL : False
- Truncate :True
- Create Target Table :True
- Click on SAVE
- Click on RUN → Observe Code
- Observe Target Table data
No comments:
Post a Comment