Datastage Scenario Based Questions and Answers for Freshers and Experienced
1. Create a job to load the first 3 records from a flat file into a target table?
2. Create a job to load the last 3 records from a flat file into a target table?
3. Create a job to load the first record from a flat file into one table A, the last record from a flat file into table B and the remaining records into table C?
4. Consider the following products data which contain duplicate records.
A B C C B D B
Answer the below questions
Q1. Create a job to load all unique products in one table and the duplicate rows in to another table.
The first table should contain the following output
A D
The second target should contain the following output
B B B C C
Q2. Create a job to load each product once into one table and the remaining products which are duplicated into another table.
The first table should contain the following output
A B C D
The second table should contain the following output
B B C
Recommended Reading
More Scenarios Based Interview Questions on Datastage at
Datastage Scenario Based Questions - Part 2
Datastage Scenario Based Questions - Part 3
3 comments
Answers please...
ReplyQ1.---source-copy stage--two link one to sort the data and that data passed to agrreagator. In aggregator stage group on given column and count rows ,and passed to 2nd link from copy which will go to to lookup.lookup on given column and add filter stage where count =1 and count>1.
Reply#Atul Kashayap Georgian
Q2.Use chnage key column in sort stage and then filter you will get result
ReplyPost a Comment