Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000
4 dd 4000, 5 ee 6000 , 6 ff 7000 and so on but myrequirement
is like this id name sal up_sal,1 aa 1000 null,2 bb 2000
1000, 3 cc 3000 2000
4 dd 4000 3000, 5 ee 5000 4000 , 6 ff 6000 50000 and so on

so how can i get it plez reply for this as soon as possible
, thanks in advanced

Answers were Sorted based on User's Feedback



my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / babu

Hi All,

Mapping:
========

Src==>SQ==>Exp(id,name,sal,up_sal,V_PreviousSal(variable
port))==>Trg

Exp Transformation is have 5 ports,
1.id port (i/o)
2.name (i/o)
3.sal (i/o)
4.up_sal is the ouput port =V_Previoussal
5.V_PreviousSal port is the output port,the value of this
port is sal
Expression of this(V_PreviousSal) port =sal

Is This Answer Correct ?    4 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / nirosha g

Use an Expression Transformation connected to Source Qualifier
taking all the columns from source
In expression Transformation create two variable ports and one
output port after Input ports in same order
v_prev_sal = iif(id=1,NULL,prev_sal);
prev_sal = sal;
o_prev_sal = v_prev_sal;

Is This Answer Correct ?    2 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / moorthy, g

Hi
In the variable port you have add
pre_sal = v_SAL
v_sal=SAL
SAL = SAL
o_update_sal = pre_SAL



Best Regards,
Moorthy. G

Is This Answer Correct ?    0 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / dev

Thanks a lot to both babu and moorthy for ur valuable time
for my doubt but i have another doubt is that as we are
assigning the port sal to prev_sal port how it holds the
previous sal as becz the currently it is holding the current
sal...... can u just explain me ...

Is This Answer Correct ?    0 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / swapnil

use CUMM(sal) function in expression like this:
id(i/o)
sal(i/o)
cum_sal(v)= cumm(sal)
up_sal= iif(sal=cumm_sal, NULL, cumm_sal)

Is This Answer Correct ?    0 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / dev

if u do not know then don't post any useless
things......plez its a request ......

Is This Answer Correct ?    0 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / ankit kansal

Hi,
If you are not sure about the id's sorting order

count = count+1
v_sal = IIF(count=1,null,v_prev_sal)
v_prev_sal = sal
out_sal = v_sal

http://deepinopensource.blogspot.com/

Is This Answer Correct ?    0 Yes 0 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / babu

Hi Dev,

do u know about ports execution order in informatica,
the order of the ports execution is
1.Input port
2.I/O input nad output port
3.Outputport
4.Variable port

still if u have any issues regarding this please call to me
(08861145051)

Is This Answer Correct ?    2 Yes 3 No

my sourse is like id name sal--1 aa 1000 ,2 bb 2000, 3 cc 3000 4 dd 4000, 5 ee 6000 , 6 ff 7000 and..

Answer / ravi

Dear Babu,
Hope the execution sequence of the ports are as:
1. Input Port
2. Variable port.
3. Output.

Will u acknowledge for the above pl..??

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

i have source flat file like 1 a,1 b,1 c,2 a,2 b,2 c i want output as 1 a,b,c and 2 a,b,c ... how can achieve this

5 Answers   TCS,


Can you copy the session to a different folder or repository?

2 Answers  


In Flat file, I need Header, Footer and No of rows in Last column. How will u achieve in Mapping Level(With out using Session Level Property)?

1 Answers   iNautix,


Can you generate sequence numbers without using the sequence generator transformation?

0 Answers  


What's the layout of parameter file (what does a parameter file contain?)?

0 Answers   Cognizant,


How we will implement Pushdown Optimization and Types in Informatica with better examples

4 Answers   TCS,


Hello, I have the below table: CityID CityName CostOfLiving 1 Mumbai 5000 1 Bangalore 4500 1 Chennai 4800 2 Vapi 6000 3 New Delhi 8000 I am passing the rows of the above table through the aggregator transformation in Informatica What happens in the following conditions: 1) I specify no group-by ports? 2) I specify a group-by on CityID without making any separate post for aggregation? Which city and costofliving will this eventually take for CityID=1? 3) Rest being same as point 2,I take the sum of cost of living.Which city will be returned for ID=1? Thanks for your help!

1 Answers  


suppose a session is failed after a transformation , from where that session will run again , i.e . from beginning or from that transformation ?

3 Answers   TCS,


how will you get 21 to 30 record from 50 records?

6 Answers  


How do you take back up of repository?

0 Answers  


Hello...... How can i set my mapping as read-only? Please answer me. Advance thanks

4 Answers  


How to do unit testing in informatica?

0 Answers  


Categories