Pages

Monday, September 1, 2014

TRANSFORMER STAGE FOR DEPARTMENT WISE DATA

TRANSFORMER STAGE FOR DEPARTMENT WISE DATA

In order to get the data according to department wise.
And if we have the data as below

a_comp ( Table name )

e_id,e_name,e_job,dept_no
100,rocky,clerck,10
200,jammy,sales,20
300,tom,clerck,10
400,larens,clerck,10
500,wagon,sales,20
600,lara,manager,30
700,emy,clerck,10
800,mary,sales,20
900,veer,manager,30


And have three targets. Our requirement is as below

In 1st target, we need a 10th and 20th department records

In 2nd Target, we need a 30th department records

In 3rd Target, We need a 10th and 30th department records

You can take Job design as below



Read and Load the data in Sequential File

Go to Transformer Stage,

Just Drag and Drop all the columns in to the three Targets.

In 1sT Constraint write expression as,

dept_no=10 or dept_no=20

In 2nd contraint write expression as,

dept_no=30

In 3rd Contraint write expression as,

dept_no=10 or dept_no=30

click ok

Give file names in all the targets.

Compile and run the jobs.

No comments:

Post a Comment