Input Data is:
Emp_Id, EmpInd
100, 0
100, 0
100, 0
101, 1
101, 1
102, 0
102, 0
102, 1
103, 1
103, 1
I want Output
100, 0
100, 0
100, 0
101, 1
101, 1
Means Indicator should either all ZEROs or all ONEs per
EmpId.
Impliment this using SQL and DataStage both.

Answer Posted / subhash

In DataStage:
SRC--->CPY---->JOIN----TFM---TGT
--------|---- /
--------|--- /
--------|-- /
--------|- /
--------AGG
In AGG, GROUP BY EmpId, calculate MIN and MAX for each
EmpId.
JOIN both one copy from CPY and 2nd Aggrigated copy from
AGG.
In TFM, put constraint: IF MIN=MAX, then populate to TGT
then u will get required output.

Is This Answer Correct ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the areas of application?

660


How do you remove duplicate values in datastage?

632


Can you explain link buffering?

728


What is oci?

855


What is "fatal error/rdbms code 3996" error?

663






Can you explain kafka connector?

777


What are the partitioning techniques available in link partitioner?

1755


Difference between server jobs & parallel jobs?

655


what is the custome stage in datastage? how can we impliment that one? plz tell me

1912


What are the components of ascential data stage?

650


Hi, what is use of Macros,functions and Routines..? At what situation you are used. If you know the answer please explain it. Thanks.

1620


describe the Steps to confiure a Qlogic switch

1939


How to manage date conversion in Datastage?

640


Define repository tables in datastage?

704


Could anyone give brief explanation bout datastage admin

1973