Page 1 of 1

Adding a new column

Posted: Tue Jan 02, 2007 12:37 am
by Munish
Hi Everybody,
Wishing you all a very happy new year.

My datasource is a dataset (DS1) created by previous job.
I need to add another columns and pass on the new dataset (DS2)
(DS1 + new column)

This new column is numeric.
It is like appending another column with value 1 to DS1 to all the rows.

Could any one help me with that.

Thanks and regards,
Munish

Posted: Tue Jan 02, 2007 12:46 am
by balajisr
Use Column generator stage to generate the new column.
In Columns tab Right Click --> Edit Row and give appropriate generator Properties to derive constant value of 1.

Posted: Tue Jan 02, 2007 12:53 am
by Munish
Yes, thats what I am using.
But my value is just one fixed number say 1 (numeric)
I am strugling to fill that column with that value (1).

Thanks

Posted: Tue Jan 02, 2007 1:21 am
by BalageBaju
Munish,

You can do as per the Balaji's suggesstion. Where are you getting struggled? In the column properties you can mention as follows:

Code: Select all

Type=cycle
Initial Value=1
Increment=0
Limit=1 
Hope this will help you to resolve your problem.

Posted: Tue Jan 02, 2007 1:24 am
by balajisr
When you right click ---> Edit Row ,what is your generator type?

Set generator type = cycle. Set Initial value = 1 and Limit = 1.

Re: Adding a new column

Posted: Tue Jan 02, 2007 5:00 am
by sudeepmantri
Use a column generator to generate a column of type integer. In the column tab of the column generator stage, double click the name of the column(short-cut method). Add the type as cycle. Initial value as 1 and increament by 0(Initial value and Increament are tsub-property of type)

Posted: Tue Jan 02, 2007 7:03 am
by DSguru2B
Munish wrote:Yes, thats what I am using.
But my value is just one fixed number say 1 (numeric)
I am strugling to fill that column with that value (1).

Thanks
Thats a confusing statement. Clarify please, else we will just be guessing.

Posted: Tue Jan 02, 2007 1:42 pm
by ray.wurlod
Either of the two solutions will work for you. Initial value is 1. Either use 0 as the increment, in which case limit is irrelevant, or use limit 1, in which case increment can be any non-negative integer, but 0 or 1 is easiest.

Posted: Tue Jan 02, 2007 4:33 pm
by Munish
Thanks Gentlemen,
It worked in the first instance itself,
Regards,
Munish