DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
Chandra234
Participant



Joined: 12 Nov 2010
Posts: 9

Points: 101

Post Posted: Mon Jul 30, 2012 12:33 pm Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Parallel
OS: Unix
Hello,

This is a 8node parallel job and we are using logic (@PARTITIONNUM+1):@INROWNUM to generate unique numbers in transformer. But this control number is generating same values for different records in the same run. Looks like the issue is happening at partition 4 after row 464. As per the logic looks like 5464 (partition 4 + 1 concatenated with row 464).
This code is to work in 7.5 but when migrated to 8.5 this is happening. Please advise.We have changed the logic to ( (@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1) and is working. Please help if there is anything wrong with previous code ((@PARTITIONNUM+1):@INROWNUM).

Thank you.
Chandra234
jwiles



Group memberships:
Premium Members

Joined: 14 Nov 2004
Posts: 1236

Points: 9942

Post Posted: Mon Jul 30, 2012 1:41 pm Reply with quote    Back to top    

What are some examples of the duplicate values you are seeing generated with the original logic, and what do you believe the values <should> have been? Do they come from within the SAME partition or from SEPARATE partitions?

Not accounting for varying length of integer numbers converted to strings (when concatenating them together) is one of the usual reasons one sees duplicates created. As an example using your original logic:

Code:
Partition 0 Record 1464:  0+1 : 1464 = 1 : 1464 = 11464
Partition 10 Record 464:  10+1 : 464 = 11 : 464 = 11464


Regards,

_________________
- james wiles


All generalizations are false, including this one - Mark Twain.
Rate this response:  
Not yet rated
Kryt0n
Participant



Joined: 22 Jun 2005
Posts: 584

Points: 3356

Post Posted: Mon Jul 30, 2012 4:48 pm Reply with quote    Back to top    

(@INROWNUM - 1) * @NUMPARTITIONS + @PARTITIONNUM + 1) would be a much tidier way of generating unique numbers.

While jwiles example is a good reason why not to follow the concatenation route, it only really applies when you have 9+ partitions (or 10+ if you don't use "+1").

No obvious reason as to why row 464 in partition 5 should be a candidate for duplicate, not doing any kind of transformer looping are you? Would assume not if this is a direct port but have to ask... How many rows do you expect in each partition and what is the datatype downstream?

Create a peek stage that includes partition num, inrownumber and your unique row for when it hits 5464 to get a better idea where it is coming from.
Rate this response:  
Not yet rated
Chandra234
Participant



Joined: 12 Nov 2010
Posts: 9

Points: 101

Post Posted: Tue Jul 31, 2012 5:06 pm Reply with quote    Back to top    

Thank you all for the response . But in my case I have a 8 node configuration. I am trying to understand why exactly duplicates strarted from row 464. Could you please explain with a example for a 8 node configuration? Thank you.

_________________
--Chandra
Rate this response:  
Not yet rated
chulett

Premium Poster


since January 2006

Group memberships:
Premium Members, Inner Circle, Server to Parallel Transition Group

Joined: 12 Nov 2002
Posts: 36601
Location: Denver, CO
Points: 186567

Post Posted: Tue Jul 31, 2012 6:22 pm Reply with quote    Back to top    

In order for people to help, you need to answer the questions being asked of you. For example, James asked two in the first part of his reply and Kryton had a couple as well. I'd also be curious how you are partitioning the data, what method you chose.

_________________
-craig

It's a scheme of devices to get at low prices all goods from cough mixtures to cables
Which tickled the sailors by treating retailers as though they were all veg-e-tables
Rate this response:  
Not yet rated
jwiles



Group memberships:
Premium Members

Joined: 14 Nov 2004
Posts: 1236

Points: 9942

Post Posted: Tue Jul 31, 2012 11:28 pm Reply with quote    Back to top    

As Kryton stated, there is no obvious reason in the information you've supplied so far that indicates why you're seeing duplicates when using your original logic. This leads to the questions we are asking in an attempt to help you determine what the problem is--understanding what you're expecting, what you're actually seeing and what else your job does helps in doing that.

Another typical and well-used method is to initialize the sequence counter (a stage variable) to @PARTITIONNUM+1 and increment it by @NUMPARTITIONS

Regards,

_________________
- james wiles


All generalizations are false, including this one - Mark Twain.
Rate this response:  
Not yet rated
Chandra234
Participant



Joined: 12 Nov 2010
Posts: 9

Points: 101

Post Posted: Mon Aug 06, 2012 11:51 am Reply with quote    Back to top    

Thank you all for support. Marking this topic as resolved.

_________________
--Chandra
Rate this response:  
Not yet rated
jwiles



Group memberships:
Premium Members

Joined: 14 Nov 2004
Posts: 1236

Points: 9942

Post Posted: Mon Aug 06, 2012 2:25 pm Reply with quote    Back to top    

Out of curiosity, was the problem resolved by utilizing one of the alternatives presented, or did you find the cause as to why the original logic was present you with issues?

Regards,

_________________
- james wiles


All generalizations are false, including this one - Mark Twain.
Rate this response:  
Not yet rated
PaulVL
Participant



Joined: 17 Dec 2010
Posts: 442

Points: 3192

Post Posted: Tue Aug 07, 2012 10:11 am Reply with quote    Back to top    

Chandra234 wrote:
Thank you all for the response . But in my case I have a 8 node configuration. I am trying to understand why exactly duplicates strarted from row 464. Could you please explain with a example for a 8 node configuration? Thank you.


Chandra, much like James orriginally said:

partition 0 row 464 will colide with partition 4 row 64.


Is that California sun getting to you?

Razz
Rate this response:  
Not yet rated
Kryt0n
Participant



Joined: 22 Jun 2005
Posts: 584

Points: 3356

Post Posted: Tue Aug 07, 2012 4:35 pm Reply with quote    Back to top    

PaulVL wrote:
partition 0 row 464 will colide with partition 4 row 64.

Is that California sun getting to you?

Razz

Not quite, partition 0 row 464 will output as 1464 (and partition 4 will be 564)... they are adding 1 to the partition number.

Time to get out the sun Razz
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours