Page 1 of 1
How to avoid blank row in Sequential file
Posted: Tue Jul 19, 2005 5:23 am
by rck
Hi,
Some one could you please help me how to avoid blank row in Sequential file.
Thanks in advance,
rck.
Posted: Tue Jul 19, 2005 5:32 am
by kumar_s
can use any of the follow
1) can use a transformer/filter to check all the colum for null
2) can use aggregator to group by any unique column and filter out the blank row
3) If every other rows are unique, can use Remove Duplicate Stage
Posted: Tue Jul 19, 2005 5:57 am
by ray.wurlod
Do you mean a sequential file from which you're reading, or to which you're writing?
You can not avoid anything in a sequential file from which you're reading; the very nature of a sequential file is that you have to read past every byte to get to the next.
So you either have to pre-process the text file to remove the blank lines, or modify your DataStage job such that it ignores them.
Posted: Tue Jul 19, 2005 2:27 pm
by sumitgulati
kumar_s wrote:can use any of the follow
1) can use a transformer/filter to check all the colum for null
2) can use aggregator to group by any unique column and filter out the blank row
3) If every other rows are unique, can use Remove Duplicate Stage
Kumar, just curious to know if we have any Remove Duplicate Stage in DataStage 7.5. I don't see it in the list of stages. Is it something you need to buy separately?
Regards,
-Sumit
Posted: Tue Jul 19, 2005 3:27 pm
by pnchowdary
Hi Sumit,
I believe that Remove Duplicate Stage is present only in the PX version (EE version) but not in the server edition. Guys, please correct me if I am wrong.
Thanks,
Naveen
Posted: Tue Jul 19, 2005 3:29 pm
by sumitgulati
pnchowdary wrote:Hi Sumit,
I believe that Remove Duplicate Stage is present only in the PX version (EE version) but not in the server edition. Guys, please correct me if I am wrong.
Thanks,
Naveen
Thanks Naveen.
Posted: Tue Jul 19, 2005 10:30 pm
by ranga1970
Yes; Remove duplicates fall in the PX
thanks
ranga
Posted: Wed Jul 20, 2005 8:41 am
by martin
Hi rck,
Input
SeqFile Stage--------->Transform Stage--------> Output
Pick one Primary Key Column from your Input file and defining Constraint on Transform Output Link
Example:
DSLink.Col > 0
This will eliminate Last New Line (blank row) in your input file
This trick worked for us.........hope it would work for you
Good Luck
Martin
Posted: Wed Jul 20, 2005 11:40 am
by kumar_s
martin wrote:Hi rck,
Input
SeqFile Stage--------->Transform Stage--------> Output
Pick one Primary Key Column from your Input file and defining Constraint on Transform Output Link
Example:
DSLink.Col > 0
This will eliminate Last New Line (blank row) in your input file
This trick worked for us.........hope it would work for you
Good Luck
Martin
i guess this is what i mentioned in my first point, can also use <> IsNull() function.