Hi Friends,
I want to insert row at runtime by using datastage.
EX. SOURCEI
ID NAME SALARY
--- ------- -------------
1 A 100
2 B 300
3 C 400
TARGET
--------
ID NAME SALARY
MAPPING(SOURCE TO TARGET)
---------------------------------------
ID -------------> . ID
NAME------------> NAME
SALARY------------->SALARY
MY RESULT SHOULD LIKE THIS
ID NAME SALARY
--- ------- -------------
1 A 100
2 B 300
3 C 400
NULL NULL 800(100+300+400) I AM ADDING FIRST THREE ROWS).
If u any body knows about this logic,can u send to me.
ok
---------
How to insert row at runtime
Moderators: chulett, rschirm, roy
Put a copy stage after the source and get two links. Link1 -> Transformer1 -> aggregator -> Transformer2 -> Funnel. Link2 -> Funnel. In transformer1 generate a dummy field. In the aggregator stage group by dummy key and map only the ID and NAME fields. The third field will be the sum field. In transformer2 generate NULL for the first 2 fields and rename the sum field to SALARY. In the funnel stage Set funnel type to sequential and specify Link2 as the first link and the link from transformer2 as the second. Might get warnings due to Nullability or data type. And also for this to work the fields ID and NAME should be Nullable Yes fields.
You've posted in an improper forum. This one is for discussion of posible FAQ topics, not for solving job problems. Here we don't know anything about your installation or even if you are seeking a Server or PX solution.
Maveric has assumed PX. Please let us know which job type you have so the Moderator can place this in the proper forum. Either that or repost the question where it belongs based on the job type.
Maveric has assumed PX. Please let us know which job type you have so the Moderator can place this in the proper forum. Either that or repost the question where it belongs based on the job type.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 4
- Joined: Mon Sep 18, 2006 9:28 am
Thanks
Thank u for ur Information.
i got it.
i got it.
Maveric wrote:Put a copy stage after the source and get two links. Link1 -> Transformer1 -> aggregator -> Transformer2 -> Funnel. Link2 -> Funnel. In transformer1 generate a dummy field. In the aggregator stage group by dummy key and map only the ID and NAME fields. The third field will be the sum field. In transformer2 generate NULL for the first 2 fields and rename the sum field to SALARY. In the funnel stage Set funnel type to sequential and specify Link2 as the first link and the link from transformer2 as the second. Might get warnings due to Nullability or data type. And also for this to work the fields ID and NAME should be Nullable Yes fields.