Page 1 of 1

Modify Stage(Defining new column with value assigned to it)

Posted: Thu Nov 06, 2008 8:13 am
by parag.s.27
Can we create a new column in modify stage output link with some value assigned to that field.

I want to create a column named 'TARGET_TABLE_NAME' with the value hard-coded as 'POLICY'. Is that feasible?
And for this what function is needed to be mentioned as Specification?

Please give me a suggestion on this regard.

Thanks in Advance.

Posted: Thu Nov 06, 2008 8:55 am
by ray.wurlod
Modify stage can create new column but the value must be based on an input column using one of the functions available to this stage type.

Posted: Thu Nov 06, 2008 9:00 am
by chulett
So... use a Transformer?

Posted: Thu Nov 06, 2008 9:27 am
by zapal
The best way is to use the "Column Generator" stage.

Posted: Thu Nov 06, 2008 9:39 am
by swades
zapal wrote:The best way is to use the "Column Generator" stage.
Did you tried :?:

Posted: Thu Nov 06, 2008 11:46 am
by zapal
Yes. I can create a column with a hard-coded value in the Column Generator Stage.

Posted: Thu Nov 06, 2008 11:47 am
by zapal
Yes. I can create a column with a hard-coded value in the Column Generator Stage.

Posted: Fri Nov 07, 2008 10:57 pm
by parag.s.27
chulett wrote:So... use a Transformer?
Actually we were earlier using a transformer, but as a performance improvement task, we are replacing all those transformers those are performing operations that can be handled by another light weight stage. Just to add a column in the incoming stream of data, a transformer usage is too costly.

Posted: Sat Nov 08, 2008 12:13 am
by ray.wurlod
Please back this kind of assertion with empirical evidence. That is, create both kinds of job and take measurements. You may be surprised.
parag.s.27 wrote:as a performance improvement task, we are replacing all those transformers those are performing operations that can be handled by another light weight stage.

Posted: Sat Nov 08, 2008 12:25 am
by parag.s.27
ray.wurlod wrote:Please back this kind of assertion with empirical evidence. That is, create both kinds of job and take measurements. You may be surprised.
parag.s.27 wrote:as a performance improvement task, we ...
We can check for number of processes created by each stage used in a particular IIS job on the AIX box. If you check for processes created by Modify stage and Transformer stage on the OS, then you'll find that transformer stage creates more number of processes. It may not mean that its performance will necessarily be less as compared to modify stage. But to get these comparison figures, I have to create the same job using Modify stage, and hence I did ask about how to create a default column with default value in Modify stage. Performance wise if it will be same as transformer, then we'll use the transformer only.