Page 1 of 2

Posted: Thu Sep 09, 2010 2:05 pm
by vinothkumar
Can you try with this

( (@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1)

Posted: Thu Sep 09, 2010 2:15 pm
by anbu
If your input is sequential file, then you can set Row Number column option in Properties to get the sequential number.

Posted: Thu Sep 09, 2010 2:17 pm
by arunkumarmm
vinothkumar wrote:Can you try with this

( (@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1)
Thanks Vinoth! But no luck with this as well. When I use this, The sequence number starts with 1 but gives a count of 177. Actual is 175. I will try with some other set of records and let you know.

Posted: Thu Sep 09, 2010 2:21 pm
by arunkumarmm
anbu wrote:If your input is sequential file, then you can set Row Number column option in Properties to get the sequential number.
Thanks Anbu. My source is most of the time is an EBCDIC file or a Dataset.

Posted: Thu Sep 09, 2010 2:24 pm
by arunkumarmm
anbu wrote:If your input is sequential file, then you can set Row Number column option in Properties to get the sequential number.
I just tried this by keeping a sequential file as a source. But the sequence number starts with 0 for every partition. :(

Posted: Thu Sep 09, 2010 2:32 pm
by anbu
arunkumarmm wrote:
anbu wrote:If your input is sequential file, then you can set Row Number column option in Properties to get the sequential number.
I just tried this by keeping a sequential file as a source. But the sequence number starts with 0 for every partition. :(
Yes Row number starts with zero. But How do you get different partition in sequential file?

Posted: Thu Sep 09, 2010 2:35 pm
by FranklinE
Does your input file have a header record or column headers in the first sequential record? That might be why your maximum row number is greater than the number of data records. That's a guess, because when the documentation says "column header records are ignored during processing" it doesn't go into detail for this situation.

Posted: Thu Sep 09, 2010 2:37 pm
by anbu
arunkumarmm wrote:
vinothkumar wrote:Can you try with this

( (@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1)
Thanks Vinoth! But no luck with this as well. When I use this, The sequence number starts with 1 but gives a count of 177. Actual is 175. I will try with some other set of records and let you know.
Your count and actual matches only if you have equal number of rows in all the partitions

Posted: Thu Sep 09, 2010 2:42 pm
by arunkumarmm
anbu wrote:
arunkumarmm wrote:
anbu wrote:If your input is sequential file, then you can set Row Number column option in Properties to get the sequential number.
I just tried this by keeping a sequential file as a source. But the sequence number starts with 0 for every partition. :(
Yes Row number starts with zero. But How do you get different partition in sequential file?
I'm not sure about this. But I have 4 partitions and I get 4 different sequence numbers starting from 0

Posted: Thu Sep 09, 2010 2:44 pm
by arunkumarmm
FranklinE wrote:Does your input file have a header record or column headers in the first sequential record? That might be why your maximum row number is greater than the number of data records. That's a guess, because when the documentation says "column header records are ignored during processing" it doesn't go into detail for this situation.
I just have a test file created by me. It doesnt have the header or a trailer.

Posted: Thu Sep 09, 2010 2:45 pm
by arunkumarmm
anbu wrote:
arunkumarmm wrote:
vinothkumar wrote:Can you try with this

( (@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1)
Thanks Vinoth! But no luck with this as well. When I use this, The sequence number starts with 1 but gives a count of 177. Actual is 175. I will try with some other set of records and let you know.
Your count and actual matches only if you have equal number of rows in all the partitions
Yes. I got it now. This is the reason! Thanks Anbu. But is there a way to over come this?

Posted: Thu Sep 09, 2010 3:10 pm
by anbu
Run the parallel transformer in sequential way and use @INROWNUM

Posted: Thu Sep 09, 2010 3:15 pm
by mhester
Run the parallel transformer in sequential way and use @INROWNUM
Seriously? :roll:

Posted: Thu Sep 09, 2010 4:21 pm
by kris007
mhester wrote: Seriously? :roll:
I have done it in the past successfully with low volume of the data.

Posted: Thu Sep 09, 2010 5:15 pm
by mhester
Agreed, but the answer should have clarified that point. There are many times that a single node configuration is preferable to a multi node, or running an operator in the sequential mode, but without knowing a bit more from the op the answer needs to be qualified.