Reading multiple files in server jobs
Posted: Sat Mar 17, 2012 11:00 am
Hi
We had requirement to read from 6000 text files(.txt) and load them into single Oracle table.
We dont take any consideration of the format of the file(directly dump into oracle table).The output oracle table has only one column.
for example :
Input :
The test1.txt has 2 rows.
01*WOLAS*350-1*OBC-S*0%%N%12791%14387%726%570%698%636%473%719%607%855%732%841%739%632%853
01*ACCHK*700-1*OBC-A*0%%N%12793%14387%80%74%84%76%70%72%68%79%63%88%71%101%80
The test2.txt has 2 rows.
01*ACACRA*400-1*OBC-A*0%%N%12805%14367%19%16%16%17%18%17%21%18%17%18%22%20%15
01*OEINV*101-3*OBC-I*0%%N%12793%14387%142%124%150%154%118%206%246%251%186%186%154%158%178
Output :
The output oracle table will have 4 rows and one column.The entire value in the first row in the source file is written into first column of the table..
We are using 7.5,Server jobs in windows environment.Is there any optimized way we can do it, other than using multiple instance job and calling it multiple times which is very tedious?
Is there any stage which does this in Server jobs?
Thanks
Kiran
We had requirement to read from 6000 text files(.txt) and load them into single Oracle table.
We dont take any consideration of the format of the file(directly dump into oracle table).The output oracle table has only one column.
for example :
Input :
The test1.txt has 2 rows.
01*WOLAS*350-1*OBC-S*0%%N%12791%14387%726%570%698%636%473%719%607%855%732%841%739%632%853
01*ACCHK*700-1*OBC-A*0%%N%12793%14387%80%74%84%76%70%72%68%79%63%88%71%101%80
The test2.txt has 2 rows.
01*ACACRA*400-1*OBC-A*0%%N%12805%14367%19%16%16%17%18%17%21%18%17%18%22%20%15
01*OEINV*101-3*OBC-I*0%%N%12793%14387%142%124%150%154%118%206%246%251%186%186%154%158%178
Output :
The output oracle table will have 4 rows and one column.The entire value in the first row in the source file is written into first column of the table..
We are using 7.5,Server jobs in windows environment.Is there any optimized way we can do it, other than using multiple instance job and calling it multiple times which is very tedious?
Is there any stage which does this in Server jobs?
Thanks
Kiran