Page 1 of 1

Convert Reusable transformation Logic.

Posted: Thu Jan 08, 2015 11:52 am
by sksdsx
Hi Experts,

we have a requirement to perform similar transformation on most of the incoming fields.

i.e. If IsNull(Lnk.col1) the SetNull() else StringToDate(Lnk.col1,"%yyyy%ddd")


as there are more than one field need to have similar derivation in multiple jobs. Just wanted to explore is there a simpler way to convert this into a function and pass Lnk.col1 as parameter.

We are exploring to convert it into routine but writing this code in C++ is bit tedious.

Please Advice!

Appreciate your time.

Posted: Thu Jan 08, 2015 12:26 pm
by qt_ky
This will not directly answer your question, however...

Are you aware of the derivation substitution feature? You can, for instance, select multiple columns (dozens or hundreds), right-click, and apply the same derivation to all selected columns in a single step.

Posted: Thu Jan 08, 2015 12:56 pm
by sksdsx
Hi ,

Thanks for your response. I am aware of derivation substitution currently we are using same mechanism but it would simplify the derivation if we could pass just the <field> as an argument and would be easy to read.

Similar to NullToEmpty function.

I have tried creating a custom transform but in derivation part StringToDate function is not recognised.

It says variable 'StringToDate' not defined.

Would appreciate your help!

Posted: Thu Jan 08, 2015 3:21 pm
by chulett
StringToDate is a parallel function. You need to stick with Server functions in the transform, for example IConv/OConv... but then you could only leverage it in a Server Shared Container or a Server job proper.

Unless I'm not understanding what you mean by 'transform'. :?

Posted: Thu Jan 08, 2015 3:35 pm
by sksdsx
Hi Chulett,

Thanks, this helps , Please correct me if I am wrong transform can only be written with help of server functions and we cannot leverage it, with parallel jobs .

Apart from Parallel routine are there any other option to achieve this.

Would appreciate any pointers/clues .

Thanks In Advance!

Posted: Wed Jan 14, 2015 8:33 am
by sksdsx
The only solution to this to generate a parallel routine.

Posted: Wed Jan 14, 2015 8:49 am
by chulett
Only? No.