본문 바로가기

ETL Tools/Oracle Data Integrator

[ODI] troubleshooting OdiSqlUnload 관련


LKM OdiSqlUnload(File) to Oracle ( SQLLDR )

There are lots of time , we have issues in dealing with huge load  and we break the process in to multiple steps like First unloading using OdiSqlunload or some native Unloader and then using the SQLLDR to load the file . The process can be time consuming and some time we don’t get the exact result.

To solve these part we have integrated the complete OdiSqlUnload with SQLLDR into one LKM with support to load directly into Target table or into the Work table as required. We have tried to make these as smart and easy it can be  like single KM for both unix and windows environment , Sqlldr log in the operator so you dont have to log into the server to check what is the error due to , Filter or join multiple tables yet getting the performance of odisqlunload .

This KM is created to move huge data from source to Target using ( odisqlunload to unload table into File ) and Loading this file using SQLLDR to oracle target , and is based on the integration of OdiSqlUnload and LKM File to Oracle ( SQLLDR ) .



KM 설명 
기능: DB to File to DB 를 지원하는 KM
특징: Data를ODI 내장 기능인 OdiSqlUnload 기능을 사용하여 File로 떨구고, SQL * Loader 를 통해 DB에 로딩하는 작업. 파라미터 설정(OdiSqlunload - Fetch Size or sqlldr - DIRECT parellel 설정 등)을 통해 일반 DB to DB 보다 빠른 성능을 보일 수 있다.

 문제점 발생

1. 한글과 특수 문자가 깨져 나오는 경우
KM을 열어보면 기본적으로 OdiSqlUnload 함수 파라미터 Character-set가 ISO-8859_1로 구성되어 있다. Cp949로 변경하면 한글 및 특수기호를 지원한다.

2. Date 날짜 컬럼이 짤려 나오는 경우  
위 KM은 Date 형식의 컬럼에 대하여 큰 고민없이 만들었지 싶다.

본인이 테스트를 하였을 경우, yyyymmddhh24miss까지 모든 정보가 다 있는 Date 형식이 위 KM을 사용하여 데이터를 이관하였을 경우 yy/mm/dd만 데이터가 남아 있고 나머지는 전부 0으로 세팅되는 경우가 발생하였다.
예) 2011/04/13 15:22:43  --ETL-->  0011/04/13 00:00:00

시도: OdiSqlUnload 파라미터 설정
           -DATE_FORMAT=yyyy/MM/dd HH:mm:ss
참고:  
http://gerardnico.com/doc/odi/webhelp/en/ref_tools/snpssqlunload.html

하였으나 결과는 마찬가지...
원인: KM에 정의되어 있는 Query에서 Date 형식을 찾을 수 없음