i/p
1,a,1000
2,b,2000
3,c,3000
i want to get o/p as
o/p
1,a,3000
2,b,4000
3,c,5000
how it can be done on using datastage?

Answers were Sorted based on User's Feedback



i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,..

Answer / ra

Simple.

ano,aname,amt
1,a,1000
2,b,2000
3,c,3000
column derivation write like this (amt+2000) then we will get o/p

Is This Answer Correct ?    16 Yes 1 No

i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,..

Answer / hussy

Hi,

My suggestion is instead of calculating for each column.

Create a stage variable (amt+2000)----> STG1

Call this STG1 in your derivation output amount column.

Is This Answer Correct ?    7 Yes 0 No

i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,..

Answer / karthi

how can u do this in tfm explain

Is This Answer Correct ?    1 Yes 4 No

i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,..

Answer / saran

in TFM stage we are mapping i/p records to o/p
then i/p metadata appear in o/p link then go to required column o/p link write there derivation whatever we want
in TFM stage
ex--- ano,aname,amt
1,a,3000
2,b,4000
3,c,5000
column derivation write like this (amt+1000)

Is This Answer Correct ?    1 Yes 12 No

i/p 1,a,1000 2,b,2000 3,c,3000 i want to get o/p as o/p 1,a,3000 2,b,..

Answer / saran

using TFM stage we can get o/p like this
in TFM stage write derivation on column level
i.e link.column+1000

Is This Answer Correct ?    0 Yes 13 No

Post New Answer

More Data Stage Interview Questions

What is the use of surrogate key stage?

2 Answers  


4) source target c1 c1 c2 c3 c2 c4 c4 c5 c3 c6 c7 c4 c5 c6 c7 please send me answer this question my mail

1 Answers  


Drop duplicate records ... SOURCE LIKE .......... ID flag1 flag2 100 N Y 100 N N 100 Y N 101 Y Y 101 N Y 102 Y N 103 N N 104 Y Y 105 N N 106 N Y 102 N Y 105 Y Y in above file if any id having both the flags as "N" then that corresponding id records should be dropped, in above case o/p should be as ID flag1 flag2 101 Y Y 101 N Y 102 Y N 102 N Y 104 Y Y 106 N Y Steps to do : 1) Identified the id’s that got duplicated (both the flag values having vales “N”) 2) Look up with these id’s to existing id’s to drop .

2 Answers  


What is the function in Transformer stage can act as Rank Function in oracle

1 Answers   Reliance,


can we see the data in fixed width file? how can u change the datatype of fixed width files?

1 Answers   Infosys,






If seg file having 10 records ex:eid 1 2 " " 10 if oracle database having 100 records ex:eid 1 2 " " 100 how to delete matched records permenently from oracle database using datastage ?

5 Answers   Infotech,


convert yyyy mm dd to dd mm yyyy?

4 Answers  


EXPLAIN SCD

0 Answers   CTS,


How to clean the datastage repository?

0 Answers  


How rejected rows are managed in datastage?

0 Answers  


Why do you need stage variables?

0 Answers  


Define project in datastage?

0 Answers  


Categories