:: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Categories >> Software >> Data Warehouse >> Data Stage


 Teradata interview questions  Teradata Interview Questions (183)
 Business Objects interview questions  Business Objects Interview Questions (751)
 Cognos interview questions  Cognos Interview Questions (842)
 Informatica interview questions  Informatica Interview Questions (1622)
 Crystal Enterprise Suite interview questions  Crystal Enterprise Suite Interview Questions (29)
 Actuate interview questions  Actuate Interview Questions (35)
 Ab Initio interview questions  Ab Initio Interview Questions (168)
 Data Stage interview questions  Data Stage Interview Questions (563)
 SAS interview questions  SAS Interview Questions (551)
 Micro Strategy interview questions  Micro Strategy Interview Questions (36)
 ETL interview questions  ETL Interview Questions (195)
 Data Warehouse General interview questions  Data Warehouse General Interview Questions (215)
souce file having the columns like 
name company
krish IBM
pooja TCS
nandini WIPRO
krish IBM
pooja TCS
if first row will be repeat i want the result like this
name company count
krish IBM     1
pooja TCS     1
nandini WIPRO 1
krish IBM     2
pooja TCS     2

 Question Submitted By :: Data-Stage
I also faced this Question!!     Answer Posted By  
# 1
first sort the both name and compamy and then,
using stage variable in transformer:
curr= name:company
val=if curr <> prev then 1 else val+1

o.p = val
Is This Answer Correct ?    6 Yes 2 No
# 2
use transforemr stage and give three stage variable with intial value as 0,
then give (if company=ibm then count=count+1 else stgvar1)
like give three conditions for remaing two companies in two stage variables)
and in column derivation give if company=ibm then stgvar1 else
if company=wipro then stgvar2 else if company=tcs then stgvar3 else 0(company not in list)
Is This Answer Correct ?    7 Yes 5 No
Shasank, Pr3systems
# 3
Just modified the last post with minor changes

First sort the both name and compamy and then,
using stage variable in transformer:
sv1= name:company
sv3=if sv1=sv2 then sv3+1 else sv3(initial value of sv3=1)
sv2=sv1(initial value of sv2 =XXXXXXX)


name company count=sv3
Is This Answer Correct ?    3 Yes 2 No
# 4
Use below stage variables

create 4 stage variables





create extra column for store this ranks.

After this stage use the sort stage to sort the data based on ranking column.

Then will get the exact output what we are looking.

krish IBM 1
pooja TCS 1
nandini WIPRO 1
krish IBM 2
pooja TCS 2
Is This Answer Correct ?    1 Yes 0 No
# 5
use aggregator stage take count(*) group by name 
Is This Answer Correct ?    1 Yes 0 No
# 6

Job Design:


1. In Sort Stage, take two key, name & company and then go
to options and create a keyChange column.
2. In transformer stage, create a stage variable of integer
type (say Var1) and write in it's derivation:
if keyChange=1 then 1 else Var1+1
3. Now create a new column in tgt (say count) and in
transformer, assign that Var1 to the derivation of count.
4. Goto o/p tab of transformer and there sort the data on
count column.
You'll get the desired output.

If you have more queries, you can mail me on

Ankit :)
Is This Answer Correct ?    1 Yes 0 No
Ankit Gosain
# 7
we can use aggregator stage.. nad group on the basis of name and company... 
Is This Answer Correct ?    0 Yes 0 No

Other Data Stage Interview Questions
  Question Asked @ Answers
Explain the ChangeApply stage?   8
How did you reconcile source with target? HP 3
what is the function in Transformer stage can act as Rank function in Oracle Reliance 1
i have a project manager round on sat this week can you post what are the main question i have to check.if you have any idea regular question on project pls send me. thanks in advance   2
How to delete the data in dataset?types of deleting the data in dataset? HSBC 3
table a contains 5 columns and table b contains 5 columns how can i get 10 columns at target?   9
hi this is kiran i have one table i want divide the table with two different table like even rows and odd rows how can i do this one tell me plzz   3
how can you generate sequence number using only the sequential file stage? TIAA-CREF 3
Hi Gus, Can u pls tell me How can u Call the Shell Scripting/Unix Commands in Job Sequence? IBM 3
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..........? IBM 4
how to remove duplicates in transformer stage by using stage variables?one example? TCS 4
In which situations we can use normal and sparse lookup stages IBM 2
For more Data Stage Interview Questions Click Here 

Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
Copyright 2013  All Rights Reserved.   ::