Page 1 of 1

delete an empty row

Posted: Tue Nov 07, 2006 5:19 pm
by satisht
hai
i just have a problem here guys
i am getting an empty row as the first row when i use the sort stage and i want to delete it(imp thing is there is an empty in the input file)

Posted: Tue Nov 07, 2006 5:24 pm
by ray.wurlod
Welcome aboard. :D

Limit it from getting to the sort. Use a filter on the Sequential File stage that reads the file, using grep or awk to bypass the empty line.

Posted: Tue Nov 07, 2006 5:49 pm
by I_Server_Whale
Hi,

Since you are on Windows, you can use a transformer to filter the empty row.

If you have MKS tool kit, then I guess you can grep or awk like Ray suggested. I'm not sure about the utility of MKS toolkit.

Does having MKS tool kit help us in using grep and awk functions in Windows environment?

Thanks,
Whale.

Posted: Tue Nov 07, 2006 6:10 pm
by narasimha
If you are sure that you are getting just one empty row in your flat file, you can do this

Include a Transformer between the input file and the Sort stage.

Add a constraint @INROWNUM>1 in your Transformer. you will get your desired result.

Posted: Wed Nov 08, 2006 8:42 am
by ray.wurlod
Most of the UNIX-on-Windows products give access to the full range of frequently-used UNIX commands. Recently I astounded some folks by opening a CMD shell, typing in SH as a command, then displaying man pages!

I do err, however, in assuming that everyone has one of these, because they can be had for free.

Posted: Wed Nov 08, 2006 8:46 am
by chulett
Ah... the Astounding Ray! :D