Page 1 of 1
Trimming issue with ORABULK
Posted: Fri Mar 17, 2006 3:09 pm
by mujeebur
Hope this issue somebody encountered.
When I generating the datafile with ORABULK stage , the traling spaces in the input string will be taken off. May I have any explanation on this ?
eg:
Input File Data
-------------------
sno, name
1,"Pennsylvania "
2,"New Jersey "
Output File Data ( datafile generated from ORABULK)
sno, name
1,"Pennsylvania"
2,"New Jersey"
Posted: Fri Mar 17, 2006 6:22 pm
by I_Server_Whale
Hi,
What is your input file format? I can see it is a comma delimited-file. Does it have any quote character??
How are you reading this file? What transformations are you putting it through?
Input Data given by you:
Code: Select all
eg:
Input File Data
-------------------
sno, name
1,"Pennsylvania "
2,"New Jersey "
Is it exactly like the above or is it like:
Code: Select all
Input File Data
-------------------
sno, name
"1","Pennsylvania "
"2","New Jersey "
That would help us better understand the problem.
Thanks,
Naveen.
Posted: Fri Mar 17, 2006 7:40 pm
by rleishman
I would use a SEQ file stage to dump data to a file rather than the Oracle BULK loader. My reasoning
here.
Posted: Mon Mar 20, 2006 1:04 pm
by mujeebur
My question is : The trailing spaces are truncating on the character variable's data.
eg: "Pennsylvania @@@@" is writing to datafile from ORABULK
as "Pennsylvania" ( where @=space )
Posted: Mon Mar 20, 2006 1:42 pm
by chulett
That's normal behaviour for the Oracle bulk loader. You need to use the 'PRESERVE BLANKS' clause if you want them retained.
Posted: Mon Mar 20, 2006 3:41 pm
by chulett
It's not available in Server. We've had to script changes into the .ctl file 'on the fly' before the actual load using 'sed' to handle things like that.
Or let it generate a .ctl file and then use your own (static) pre-edited one during the load.