Hi,
I have 3 records,
1 Srini
1 vasa
2 reddy

now i want o/p like this
1 Srinivasa
2 reddy

could u please help in this

Thanks in advance.

Answers were Sorted based on User's Feedback



Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / madhavareddy

seqstage->sortstage->transformerstage->removedupicatestage->targetdataset

sortstage->put chagekeycolum=true

transformer -> stagevariable->sv1 if change key colum =1 then in.column else sv1::in.column

in derivation colum give ->sv1

then in remove duplicate stage keep last record option

then you will get desired output

Is This Answer Correct ?    2 Yes 0 No

Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / prasad

MadhavaReddy, who gave logic that is correct.

I tried, got exact result.

Is This Answer Correct ?    0 Yes 0 No

Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / gopal

In the transformer stage u can use concatination symbol for
first two records like Record1 : Record2 this is for first
column and second column u mentioned as it is.

Is This Answer Correct ?    6 Yes 9 No

Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / radhakant kumar

hey it is just a example it could be like this..
1 Srini
1 vasa
1 aaaaa
the complete solution will be
say col1 and col2 so define stage variable in transformer
col1--------------->a(interger)
col2--------------->b(varchar)
if a=c then d:b else ''-->e(varchar)
e----->d(varchar)
a----->c(integer)

then in target pass e value to col2 and map col1 to col1

Is This Answer Correct ?    2 Yes 5 No

Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / narayana kota

Hi

you can do this job using Pivot Stage convert these rows in
Columns by specify the column name in pivot stage as
first_column ,second_column and third_column and using
tranformer stage concatante first_column and second_column
using stage variables and pass to target.


if any method is there plz let me known
Regards
Narayana Kota
pnarayana12@gmail.com

Is This Answer Correct ?    2 Yes 6 No

Hi, I have 3 records, 1 Srini 1 vasa 2 reddy now i want o/p like this 1 Srinivasa 2 ..

Answer / satya

Make U r source file as SOURCE and LOOKUP Files then
Make lookup on key(in u r question first column),if u find
then concatination of u r source value and u r look up VALU
(Srini:Vasa)

Is This Answer Correct ?    1 Yes 7 No

Post New Answer

More Data Stage Interview Questions

Difference between JOIN,LOOKUP,MERGE?

2 Answers   CTS,


Hi Every one, I have a scenario plz suggest me 1)On daily we r getting some huge files data so all files metadata is same we have to load in to target table how we can load? 2) One column having 10 records at run time we have to send 5th and 6th record to target at run time how we can send? Hi plz help me for above scenarios and If any one is having JobSequence kindly send me one example and the scenario to my mail ID(nrvdwh@gmail.com)

3 Answers   HSBC,


how to load meta data

2 Answers   IBM,


How to transfer file from one system to another system in UNIX?which command to be use?

4 Answers   Cap Gemini, TCS,


INPUT file 'A' contains: 1 2 3 4 5 6 7 8 9 10 input file 'B' contains: 6 7 8 9 10 11 12 13 14 15 Output file 'X' contains: 1 2 3 4 5 Output file 'Y' contains: 6 7 8 9 10 Output file 'Z' contains: 11 12 13 14 15 How can we implement this in a single ds job?

11 Answers   CTS,






What is ibm datastage?

0 Answers  


How do u view log file for a particular job?

6 Answers   HP,


one file contains col1 100 200 300 400 500 100 300 600 300 from this i want to retrive the only duplicate like this tr1 100 100 300 300 300 how it's possible in datastage?can any one plz explain clearley..........?

8 Answers   IBM,


How the ipc stage work?

0 Answers  


for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

0 Answers  


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

0 Answers   Wipro,


client know skid info?

0 Answers   NTT Data,


Categories