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
What are stage variables and constants?
Hi,can any one please mention list of dimension and fact tables for Sales and Distribution System for a Pharmacutical company.
How one source columns or rows to be loaded in to two different tables?
What are data elements?
Describe stream connector?
What are iconv and oconv?
What is a merge in datastage?
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
in oracle target stage when we use load option and when we use upsert option?
What is apt_config in datastage?
What are the different common services in datastage?
CHANGE CAPTURE
What are the features of datastage flow designer?
What is difference between symmetric multiprocessing and massive parallel processing?
In work load management there are three options of Low priority, Medium priority and High Priority Jobs which can be used for resource management. why this feature is developed when there is already jobs prescheduled by scheduler or autosys. what will be the use of workload management then?