Merge stage mapping error

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Merge stage mapping error

Post by PhilHibbs »

I made a mapping error in a Merge stage, but the consequences of the error are inexplicable.

The first input file had columns, lets call them A, B, and C, that are all Decimal 7, Scale 1, Display 9. The output had identical columns, and I should have mapped A->A, B->B and C->C, but I accidentally mapped C->A, B->B, C->C. The actual column names were easily confused, and I was careless in not mapping them correctly.

The consequences of this, however, were that the C column contained entirely null values after the first record of output. I fixed the mapping by mapping A->A and re-ran, and this fixed the contents of the C column in the output.

Any idea what was going on here?
Phil Hibbs | Capgemini
Technical Consultant
Krazykoolrohit
Charter Member
Charter Member
Posts: 560
Joined: Wed Jul 13, 2005 5:36 am
Location: Ohio

Post by Krazykoolrohit »

I dont think its explainable.

Have you tried to repeat the scenario by mappping C->A again.

does C contain nulls?
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Re: Merge stage mapping error

Post by vivekgadwal »

PhilHibbs wrote:The output had identical columns, and I should have mapped A->A, B->B and C->C, but I accidentally mapped C->A, B->B, C->C. The actual column names were easily confused, and I was careless in not mapping them correctly.

The consequences of this, however, were that the C column contained entirely null values after the first record of output.
Any idea what was going on here?
What is the join condition you are using in the Merge stage? What is the output you were getting. Were you getting nulls after the first record in output.A or you were getting some values for it? Please provide us the details so that we have a little more idea of what is going on!
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
PhilHibbs
Premium Member
Premium Member
Posts: 1044
Joined: Wed Sep 29, 2004 3:30 am
Location: Nottingham, UK
Contact:

Re: Merge stage mapping error

Post by PhilHibbs »

vivekgadwal wrote:What is the join condition you are using in the Merge stage? What is the output you were getting. Were you getting nulls after the first record in output.A or you were getting some values for it? Please provide us the details so that we have a little more idea of what is going on!
The join condition was some other key value, not one of the values that were mismapped. In order to know if output.A contained the values of C, I'd need to restore the broken job from a backup, as we have fixed the problem now and the values in A, B and C were largely similar. output.A was populated with values though.
Phil Hibbs | Capgemini
Technical Consultant
Post Reply