repositioning columns in PX.

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
dxp
Charter Member
Charter Member
Posts: 48
Joined: Sat Oct 01, 2005 10:23 am

repositioning columns in PX.

Post by dxp »

Hi,

how to reposition columns in metadata tab, in PX stages.
i found same question for Server jobs in this forum.
apraman
Participant
Posts: 47
Joined: Mon Sep 12, 2005 5:26 am

Post by apraman »

The repositioning of column of parallel or server stages are same.

For example in a Tranformer Stage of a parallel job
You have the columns in the Input
Select those you need drag it to output link
You can change the column order by draging in the output link
if you want change the name of the output column in the metadata tab just edit the column name of output.
dxp
Charter Member
Charter Member
Posts: 48
Joined: Sat Oct 01, 2005 10:23 am

Post by dxp »

thanks apraman.

but i am not speaking about Transformer stage.
how to do it in otherthan Transformer stage...
eg:..(1).while loading selected columns in odbc stage.. i want to reposition the columns.
(2) while using modify stage...i want to reposition columns.

how to do it?>?
s_rkhan
Participant
Posts: 20
Joined: Thu Mar 03, 2005 6:26 am

Post by s_rkhan »

Just try to use the Copy Stage and in the copy stage define the schema that is coming in the input and also the schema that you want in the output. But dont do the mapping manually, instead of mapping just check the Runtime column propgation box.

This will also helps in dropping some of the input columns which you dont need in output.

Please note that the names of the input and output columns should be same e.g. if the input schema contains col1, col2, col3, col4, col5, col6 then output columns should have the above names only but can be in any order.
apraman
Participant
Posts: 47
Joined: Mon Sep 12, 2005 5:26 am

Post by apraman »

I donot think you can do that with those file stage which are used as SOURCE - say Oracle Stage.

Moreover how can you think of repositioning of column ODBC stage which is source. The way you retrive the data, it will the reflected same in the output link.

While Retreiving data from Database, If want do any thing such you need specify the Source Read Method as User defined SQL/ Auto generated SQL and write the SELECT statement having your desired column representation and define the meta data as per sequence of the column you retrive.

After u have mentioned source method and its query, If u need do any such reposition, you need use transformer or copy stage.

DS Gurus correct me if i'm wrong
dxp
Charter Member
Charter Member
Posts: 48
Joined: Sat Oct 01, 2005 10:23 am

copy stage

Post by dxp »

Hi s_rkhan,

thank u very much.
i got the solution.
this is what i needed.
Copy stage will be the solution.
thanks.
dxp
Charter Member
Charter Member
Posts: 48
Joined: Sat Oct 01, 2005 10:23 am

repositioning columns

Post by dxp »

Hi,

in Copy stage, its possible to just reposition the columns by drag and drop.
in output window, if we click on specific column and under 'Column' heading...then we can drag any column to any position.

and one more updation...any stage which is having 'mapping' tab in outputs window.....repositioning of columns is possible...by doing the same thing as i mention in above sentence...
Post Reply