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
options available in sequence job to run,validate?
What are the different kinds of views available in a datastage director?
How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?
DB2 connector> transformer > sequential file Data will be exported into a csv format in a sequential file. This file will be send in a email using a sequence job. Problem here is, how to avoid sending a blank csv file? When I ran the job there are chances that it might return zero records but in the sequence job csv file is going blank. how can I avoid this? thanks
Where do you see different stages in the designer?
What is staging variable?
What is the use of datastage designer?
What are routines in datastage? Enlist various types of routines.
Differentiate between Symmetric Multiprocessing and Massive Parallel Processing?
In Informatica,for the table I can find coreesponding dependent mappings.Likewise can I find the dependent jobs with all the information by using the table name
Difference between in process and inter process?
How to reverse the string using unix?
Differentiate between datastage and datastage tx?
What are the types of containers in datastage?
how to run a sequential file stage in parallel if the stage is used on the TARGET side