FIELD FUNCTION IN TRANSFORMER STAGE WITH EXAMPLE
Some times we get the data as belowCustomers
1,tommy,2000
2,sam,2300
3,margaret,2000
4,pinky,1900
5,sheela,2000
Take Job Design as
Seq.File ------- Tx ------ Ds
Read and load the data in Seq.file
Select first line is column name
And in Transformer stage Create three columns to get the data
You can take columns names as c_id,c_name,c_sal with respective data types.
Write the expression in Derivations to the columns as below
Field (dslink3.customers,',',1) for c_id
Field (dslink3.customers,',',2) for c_name
Field (dslink3.customers,',',3) for c_sal
That's it you will get the data in 3 different columns in the output as required.
After compile and Run the Job.
Nice to see the example in simple methods.
ReplyDeleteYou have explained about transformer stage easy method and any layman can understand the steps. Thanks for sharing with us
Transformer Stage