Data Stage Scenarios: Scenario1. Cummilative Sum
Data Stage Scenarios: Scenario1. Cummilative Sum
Data Stage Scenarios: Scenario1. Cummilative Sum
VCUMMSUM=VCUMMSUM + DSLink3.SAL
2. EACH DEPT WISE HIEGHST AND LOWEST SAL REQUIRED
Output
3.Split the non-key columns to separate tables with key column in both
Source:
Target:T1
Target:T2
JOB:
Job Logic:
Copy stage
T1: ID,NAME
T2:ID,PHONENO
4,Converting Rows into Columns without using pivot:
Source:
Target:
Job Design:
Job Logic:
In Transformer Change the Field Name MONTH1 to MONTH Similary for MONTH2,MONTH3
Source:
Target:
Job Design:
Job Logic: Take one record from head and take one record from Tail and club these two at target
Source:
Target:
JOB:
select * from emp where rownum <= ( select count(*)/2 from emp)
Source:
Target:
Job Design:
Job Logic:
Select * from emp minus Select * from emp where rownum <= ( select count(*)/2 from emp)
Source:
Scenario 8: How to send Even record in to one target &Odd records in to another target:
Source:
Target:
Even:
Odd:
Job Design
JobLogic:
Create Stage variable with name Flag and enter following derivation
And in Transformer Constraints Even link apply the condition FLAG="EVEN" Similarly for Odd
constraint apply the condition FLAG="ODD"
Scenario 9: In Emp table there are three departments (dept no 30,20,10). Separate the record
to different target department wise.
Source:
Target1:
Target2:
Target3:
Job Design:
Job Logic:
Scenario10: How to load every nth row from a Flat file/ relational DB to the target? Suppose
n=3, then in above condition the row numbered 3,6,9,12,....so on, This example takes every 3
row to target table.
Source: Emp table has 14 records out of 14 records it needs to be load 4 records in to target
Method1:Use sample stage and operate in period mode set the properties given below
Samplemode=period
Perpartition=3
Target:
Method2:
Jobdesign:
Job Logic: Create stage variable with CNT and assign initial value zero and write expression in
derivation part
CNT=CNT+1
Mod(StageVar,3)=0
Target:
Scenario11:In source there are some record. Suppose I want to send three targets. First record
will go to first target, Second one will go to second target and third record will go to third
target and then 4th to 1st,5th to 2nd , 6th to 3rd and so on.
Jobdesign:
Logic:
In column generator create new column ie seqno and in extended column properties apply the
condition given below
Generator:
Type=Cycle
Intialvalue=1
Increment=1
Max=3
So now the seqno value generate like 1,2,3,1,2,3- -so like next in transformer for three targets apply
the condition which is given below
Target1= DSLink4.seqno=1
Target2= DSLink4.seqno=2
Target3= DSLink4.seqno=3
Scenario12:Previous Sal