Hi
Can any one help regarding below

INPUT

NAME LOC
Ram hyd
Ram ban
Raj chn
Raj Pun
Sam del

OUPUT

NAME LOC
Ram Hyd ban
Raj chn pun
sam del

Answers were Sorted based on User's Feedback



Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam ..

Answer / ashok

TRANSFORMER:
------------
STEP1:
Take 3 stage variables
NAME--->s1
if s1<>s3 then LOC else s2:LOC --->s2
s1--->s3
STEP2:
In derivations s2--->LOC Field
Remove duplicate stage:
-----------------------
Retaining last

Is This Answer Correct ?    7 Yes 0 No

Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam ..

Answer / vikram

1)Sort the input (name as key),keychange colum =true
we will get
name loc key..
ram hyd 0
ram ban 1
raj chn 0
raj pun 1
sam del 0

2)transformer
  stage variable 
  svVar=if key..=0 then loc else svVar:loc
3) remove duplicate stage 
retain duplicate last 

Is This Answer Correct ?    0 Yes 0 No

Hi Can any one help regarding below INPUT NAME LOC Ram hyd Ram ban Raj chn Raj Pun Sam ..

Answer / venkata ramana

Input Seq File:-

NAME,LOC
Ram,hyd
Ram,ban
Raj,chn
Raj,Pun
Sam,del

seq---Trans---Rem Dups----> Dataset


TRANSFORMER:
------------
STEP1:

Create 3 stage variables like s1,s2,s3

DSLink3.NAME --->s1

If s1<>s3 then DSLink3.LOC else s2:DSLink3.LOC --->s2

s1--->s3

STEP2:

Derivations Column bane

s2------------> LOC


Remove duplicate stage:
-----------------------

Key == NAME

Duplicate To Retain = Last


Output Dataset result:-

NAME LOC
Ram Hyd ban
Raj chn pun
sam del

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Data Stage Interview Questions

How much data u can get every day? 2)which data ur project contains? 3) what is the source in ur project?what is the biggest table & size in ur schema or in ur project?

2 Answers   Wipro,


Differentiate between datastage and informatica?

0 Answers  


what is meant by port ? what is the use of port ? what are the different type of ports and its usage

2 Answers   Accenture,


source has 2 fields like COMPANY LOCATION IBM HYD TCS BAN IBM CHE HCL HYD TCS CHE IBM BAN HCL BAN HCL CHE LIKE THIS....... AND I WILL GET THE OUTPUT LIKE THIS.... Company loc count TCS HYD 3 BAN CHE IBM HYD 3 BAN CHE HCL HYD 3 BAN CHE PLZ SEND ME ANSWER FOR THIS QUESTION..........

3 Answers   Patni,


Hai..,This is Kiran M. What is D/B Change Capture stage and Difference stage?

2 Answers  






If you want to use the same piece of code in different jobs, how will you achieve it?

0 Answers  


What is the method of removing duplicates, without the remove duplicate stage?

0 Answers  


how can we create rank using datastage?what is the meaning of rank?

0 Answers   IBM,


How to find value from a column in a dataset?

0 Answers   TIAA CREF,


5) A file contains 10 (1-10) I want trgt like Trgt 1 trgt 2 trgt 3 1 2 3 4 5 6 7 8 9 10

4 Answers  


How many nodes supported by a one cpu in parallel jobs?

3 Answers   IBM,


Different ways a project can be moved to production ?...example ….export-import and Version control.

0 Answers  


Categories