Page 1 of 1

How to pad chars in partial schema file

Posted: Fri Mar 16, 2012 6:02 am
by bgs_vb
Hi,
I haveseven fields in source and i want to use only last five fields .
I saw a roperty coltoignore in datsatge help in which we can define numer of character to ignore while defining the schema .
As my file is comma separated file and do not have fixed width , i want to pad # if field length is less than to tal length of first two fields .

Source File
plmn,abc,Joe,LKO,JMathur,Physics,100
klmn,ab,Meera,LKO,MMathur,Chemistry,500

Col1 can have maximum value of 3 chars and col 2 can have maximum value of 3 chars ,So i defined partial schema as follow:

record {intact=details,final_delim=end,record_delim_string="\r\n"}
(
colstoignore: string {Width=8,PadChar='#',delim=','};
v1: string {delim=','};
v2: string {delim=',' };
Name: string {delim=','};
v3:string {delim=','};
Income: int32 {delim=none};
)



But this is not working . It si not padding the # for second row as it has total length of two fields a s 7 .
Please guide me on how can w e pad characters in partial schema for a column .