Hi...
I want to process last record seperately... how to know whether coming record is last or not.. i tried using @INROWNUM but not able to come to any conclusion... plz help me..
How to check for last record
Moderators: chulett, rschirm, roy
How to check for last record
Thanks,
Neha
Neha
You won't know that you are processing the last row until you hit the end-of-file, when it is too late. You can pass the number of rows into the job as a parameter and compare against that number in the transform stage.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 467
- Joined: Tue Mar 20, 2007 6:36 am
- Location: Chennai
- Contact:
Why do you want to do this in a Transformer stage?
If you want to look at other options, you can use a Tail stage to get the last record in each partition or the last record in any of the partitions. Or if you want a really funky logic, you can hardcode a value in a new column (say dummy='x') and then pass it through a remove duplicates and retain the last row.
If you want to look at other options, you can use a Tail stage to get the last record in each partition or the last record in any of the partitions. Or if you want a really funky logic, you can hardcode a value in a new column (say dummy='x') and then pass it through a remove duplicates and retain the last row.
Minhajuddin
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>