Informatica Mapping question

Design mapping to load the first record from a flat file into Table A, the Last record from a flat file into Table B, and remaining record into Table C

Questions by Prabhu_info

Showing Answers 1 - 9 of 9 Answers

gaja

  • Oct 13th, 2014
 

use two sessions

wf--->s1--->s2

1)in 1st session find count using aggregator t/rn then assign it to mapping variable and pass this variable to work flow varible using post session command in session properties
2) in session2 create another mapping variable and assign workflow variable value to mapping variable and use it in rowter

source--->exp--->router----->t1,t2,t3
in expression generate seq using variable port .
in router condition are
iif seq =1 then target 1
iif seq = $mapping variable (means last record) to t3
default ==>t2

---->alternate clue is aggregator with out any group-by port will return last record

  Was this answer useful?  Yes

sum

  • Oct 8th, 2015
 

Use aggregator to take count of rows;
then again join this aggregator to source pipeline using dummy columns.
Now add one sequence generator and add next_val as srnum from it to each source columns in expression
Now add a router with 3 groups
first one will be SRNUM=1
second will be SRNUM !=1 AND SRNUM != count of rows
3rd one will be SENUM=count of rows
and connect these 3 group to a,b,and c

  Was this answer useful?  Yes

Nagendra

  • Nov 5th, 2015
 

Append Seq Gen after SQ, add sorter, make it desc based on Sequence generated and use a variable to make first row as 0 then by using router route SEQGEN = 1 to A (First Row), Variable =0 to B (Last Row) and rest to C

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions