If you know Better Answer, Comment Below!

Wednesday, April 13, 2011

Field Function in Transformer Stage with example

Some times we get the data as below


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.

If you know Better Answer for Above Question Comment below to Answer.

No comments:

Popular Posts