Join problem!

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Join problem!

Post by abc123 »

I have 2 links joining 10 rows each. I know that they are identical on the key column so that is definitely NOT the reason. The key column is char but has numbers like 1234. The number of rows I get after the inner join is less than 10. Could the positioning of the numbers in the column be a reason? How about partitioning on the join stage?
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Post the ten rows of keys. Also post the partitioning you are using.

Right now the answer to your question is a definite "maybe".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

I found the problem. It is due to join on a char field. The actual numeric data inside is smaller than the field width in all cases and this is causing the problem. Is there any way to get around this? Should I pad blanks on the left?
hamzaqk
Participant
Posts: 249
Joined: Tue Apr 17, 2007 5:50 am
Location: islamabad

Post by hamzaqk »

why do u want to pad it ? why dont u use the TRIM function or cast one of them into INT .. i think that should work ok..
abc123
Premium Member
Premium Member
Posts: 605
Joined: Fri Aug 25, 2006 8:24 am

Post by abc123 »

I take that back. I haven't found the solution. After I converted everything to integer in a transformer stage, the join still returns less value. I'll post some data.
Post Reply