populate output field depending on differnt value from input
Posted: Fri Oct 06, 2006 8:14 pm
Hi all,
First let me thank you to help me. I really appreciate it. Now I need help in the following situation. My files look like this
INPUT OUTPUT
------- ---------
Field-a Out-a
Field-b-typ Out-x
Field-b-val Out-y
Field-c-typ Out-z
Field-c-val
Field-d-typ
Field-d-val
Now the derivation rules are as follows:
1) Out-a from Field-a
2) Out-x from Field-b-val if Field-b-typ = 'x' or from Field-c-val if Field-c-typ = 'x' or from Field-d-val if Field-d-typ = 'x'
3) Out-y from Field-b-val if Field-b-typ = 'y' or from Field-c-val if Field-c-typ = 'y' or from Field-d-val if Field-d-typ = 'y'
4) Out-z from Field-b-val if Field-b-typ = 'z' or from Field-c-val if Field-c-typ = 'z' or from Field-d-val if Field-d-typ = 'z'
So is anybody can tell to do this without using complicated logic in a "Transform" stage.
I really appreciate your help.
Thanks,
Hemanta
First let me thank you to help me. I really appreciate it. Now I need help in the following situation. My files look like this
INPUT OUTPUT
------- ---------
Field-a Out-a
Field-b-typ Out-x
Field-b-val Out-y
Field-c-typ Out-z
Field-c-val
Field-d-typ
Field-d-val
Now the derivation rules are as follows:
1) Out-a from Field-a
2) Out-x from Field-b-val if Field-b-typ = 'x' or from Field-c-val if Field-c-typ = 'x' or from Field-d-val if Field-d-typ = 'x'
3) Out-y from Field-b-val if Field-b-typ = 'y' or from Field-c-val if Field-c-typ = 'y' or from Field-d-val if Field-d-typ = 'y'
4) Out-z from Field-b-val if Field-b-typ = 'z' or from Field-c-val if Field-c-typ = 'z' or from Field-d-val if Field-d-typ = 'z'
So is anybody can tell to do this without using complicated logic in a "Transform" stage.
I really appreciate your help.
Thanks,
Hemanta