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

Hi, Please tell me how to solve this scenario in datastage ? Here we have 3 columns in a table TEST CODE,ENTRY DATE and BATCH The table looks like CODE ENTRYDATE BATCH 100 100716 1 100 100716 1 100 100716 1 200 122517 2 200 122517 2 302 555555 8 302 555555 8 302 555555 8 We need to create a seqno on grouping these 3 columns. The result should be like this. CODE ENTRYDATE BATCH SEQNO 100 100716 1 1 100 100716 1 2 100 100716 1 3 200 122517 2 1 200 122517 2 2 302 555555 8 1 302 555555 8 2 302 555555 8 3

1 Answers   Alpharithm Technologies,


what is a force compile

2 Answers   Cap Gemini, IBM,


Name the command line functions to import and export the DS jobs?

0 Answers  


Why we use surrogate key?

0 Answers  


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.

6 Answers   Teradata,






i want anser this question empno,ename,sal 12,mmm_ww,200 13,nnn_xx,300 14,bbb_qq,400 which stages are take which types of logicks are doing pls help me i don't need "_"ex nnnxx this type i want

3 Answers  


Give example for FACTLESS FACT TABLE in real-time scenario.

4 Answers   TCS,


3) Sequential file contains data like Empno ename sal 111 abc 2000 Trgt file: Trgt1----111 Trgt2----abc Trgt3---2000

2 Answers  


In my previous project we get data from mainframe and load it into datastage DB2 tables.Sometimes we get data as flat file or a mainframe tables itself directly we fetch the data.Is this a migration project?

1 Answers   TCS,


What are the third party tools you used in your project?

1 Answers   IBM,


what are the devoleper roles in real time? plz tell i am new to datastage....

0 Answers   Mphasis,


I/p : F1 table have A,B,C,D,E and F2 table having C,E,V i need output 0utput1: ABD output2: V any one suggest me this

0 Answers  


Categories