GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Data Warehousing  >  ETL
Go To First  |  Previous Question  |  Next Question 
 ETL  |  Question 48 of 65    Print  
Develop a mapping to extract the employee drawing maximum salary where deptno = department drawing maximum sum(salary) group by dept.
sources are cobol files / flat files.
This is the recent question faced in ibm.


  
Total Answers and Comments: 4 Last Update: December 16, 2008     Asked by: naresh 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
September 30, 2007 05:42:17   #1  
gkbiswal Member Since: September 2007   Contribution: 4    

RE: Develop a mapping to extract the employee drawing ...
what's understood from the question is to findout the employeename drawing the max salary.If it's not can u crarify the question .


 
Is this answer useful? Yes | No
November 19, 2007 07:55:00   #2  
viswanadh kintali        

RE: Develop a mapping to extract the employee drawing ...
I dont think this can by using a mapping. Following sql gives the dept number that gives maximum salary paid to all the employees put together.

SELECT b

.deptno
FROM

(SELECT deptno

SUM(salary) sal FROM emp GROUP BY deptno) b

WHERE

sal (SELECT MAX(a.sal) sals
FROM (select deptno sum (salary) sal
FROM emp GROUP BY
deptno) a)


Let me know if this helped you.

visu


 
Is this answer useful? Yes | No
October 14, 2008 16:04:07   #3  
Mamta11 Member Since: July 2008   Contribution: 12    

RE: Develop a mapping to extract the employee drawing maximum salary where deptno = department drawing maximum sum(salary) group by dept.sources are cobol files / flat files.
This can be done in informatica mappinsg by using the Aggrgator transformation.
Select all the ports from source qualifier joining on departmetn into aggregator .
Group by departmetn no and select max(salary)

 
Is this answer useful? Yes | No
December 16, 2008 05:24:58   #4  
sri_test Member Since: December 2008   Contribution: 3    

RE: Develop a mapping to extract the employee drawing maximum salary where deptno = department drawing maximum sum(salary) group by dept.sources are cobol files / flat files.

It is not possible to combine two tables with different sources so first convert the department table normal oracle target

Mapping 1:

1: For cobol dept source use normalizer to convert to oracle target
2: For flat files simply convert to oracle using source transformer

Mapping 2:

1: Use the converted dept mapping 1 (oracle source) and emp table (oracle source) connect there source transformer to joiner tranformer using emp.deptno dept.depno
2: Since joiner doesn't join directly with aggregator take the output to expression transformation then to aggregator apply max(sal) group by deptno
3. Finally take the output to target

Workflow:

Design the worflow(W1: Mapping 1) then workflow (W2: Mapping2) make w2 to run only if w1 is finished and successfully completed.


 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape