Guys,
I have an issue with the data that is loaded in to the sequential file.
1) 10161|000471276|Baja||||||||||||TX||4|0
2) 10175|000471276|Baja||||||||||||TX||4|0
3) 10161|000474056
|Baja||||||||||||TX||4|0
4) 10175|000474056
|Baja||||||||||||TX||4|0.
I am getting that extra spaces or line for the 3rd and 4th rows. Except for these 2 rows entire file is proper. I have used TRIM and TRIMB function in the transformer for the 2nd column still i am getting the error. TRIMB(DB_Data.DUNS). The data type for this column is defined as varchar(30).
thanks
Trim
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
Pre process your file and then run your job
Code: Select all
$ cat file
10161|000471276|Baja||||||||||||TX||4|0
10175|000471276|Baja||||||||||||TX||4|0
10161|000474056
|Baja||||||||||||TX||4|0
10175|000474056
|Baja||||||||||||TX||4|0
$ awk -F"|" ' NF != 18 { a=$0; getline;$0=a$0 } ; 1 ' file
10161|000471276|Baja||||||||||||TX||4|0
10175|000471276|Baja||||||||||||TX||4|0
10161|000474056 |Baja||||||||||||TX||4|0
10175|000474056 |Baja||||||||||||TX||4|0
You are the creator of your destiny - Swami Vivekananda
-
- Participant
- Posts: 246
- Joined: Mon Jun 30, 2008 3:22 am
- Location: New York
- Contact:
Re: Trim
Yes. That is not a space. It seems to be a line terminator.just4u_sharath wrote:Guys,
I have an issue with the data that is loaded in to the sequential file.
1) 10161|000471276|Baja||||||||||||TX||4|0
2) 10175|000471276|Baja||||||||||||TX||4|0
3) 10161|000474056
|Baja||||||||||||TX||4|0
4) 10175|000474056
|Baja||||||||||||TX||4|0.
I am getting that extra spaces or line for the 3rd and 4th rows. Except for these 2 rows entire file is proper. I have used TRIM and TRIMB function in the transformer for the 2nd column still i am getting the error. TRIMB(DB_Data.DUNS). The data type for this column is defined as varchar(30).
thanks
Arun
-
- Premium Member
- Posts: 236
- Joined: Sun Apr 01, 2007 7:41 am
- Location: Michigan
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: