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
sed,awk,head
In Datastage, how you can fix the truncated data error?
How to perform incremental load in datastage?
Define data aggregation?
What is the difference between odbc and drs stage?
Hi everyone,I have kept a project Sales And Distribution for a pharmaceutical company.can anybody explain one complex business rule that we had in our project and how did you accomplish it using DS?
What is meta stage?
how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
Define Job control?
What are the steps needed to create a simple basic datastage job?
what is the custome stage in datastage? how can we impliment that one? plz tell me
how many rows sorted in sort stage by default in server jobs
How to write a expression to display the first letter in Caps in each word using transformer stage ? Please let me know ASAP Thanks in advance...
What are stage variables, derivations and constants?