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?
Merge stage mapping error
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Merge stage mapping error
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Charter Member
- Posts: 560
- Joined: Wed Jul 13, 2005 5:36 am
- Location: Ohio
-
- Premium Member
- Posts: 457
- Joined: Tue Sep 25, 2007 4:05 pm
Re: Merge stage mapping error
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!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?
Vivek Gadwal
Experience is what you get when you didn't get what you wanted
Experience is what you get when you didn't get what you wanted
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Re: Merge stage mapping error
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.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!
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant