Page 1 of 1

Merge stage mapping error

Posted: Mon Jun 09, 2008 3:04 am
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?

Posted: Mon Jun 09, 2008 10:52 am
by Krazykoolrohit
I dont think its explainable.

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

does C contain nulls?

Re: Merge stage mapping error

Posted: Mon Jun 09, 2008 12:49 pm
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!

Re: Merge stage mapping error

Posted: Tue Jun 10, 2008 2:11 am
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.