Vector

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
murari83
Participant
Posts: 14
Joined: Tue Sep 25, 2007 4:05 am

Vector

Post by murari83 »

Hi

How to convert vector date to normal data.

eg:[1 2] Vector data

I nedd to convert to normatal data like 1 2
m.ramakrishna
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You probably need a Split Vector stage. Check out the stages in the Restructure folder.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Gokul
Participant
Posts: 74
Joined: Wed Feb 23, 2005 10:58 pm
Location: Mumbai

Post by Gokul »

We tried using the split vector. But its give compiatio error saying that the stage we cannot convert variable vector to fixed vector.

The orignal vecto was created by using make_subrecord stage.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Vectors are not the same as subrecords. To decompose a subrecord you need to use either Split Subrecord or Promote Subrecord stage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
murari83
Participant
Posts: 14
Joined: Tue Sep 25, 2007 4:05 am

Post by murari83 »

ray.wurlod wrote:You probably need a Split Vector stage. Check out the stages in the Restructure folder. ...
Hi Ray,

please verify the below information

Input
------
Accno name sum
10 a 1
10 a 2
20 b 3
20 b 4

Job design
-----------

Dataset --------------->Combine_records (stage)--------->dataset

key:accno
Subrecordoutout colum:Final

we getting this out put

final accno
----- -------
[(a 1) (a 2)] 10
[(b 3) (b 4) 20


after in out put i am using this stage

Dataset--------------------> split_subrecord------------>dataset


subrecod colum: final

out put
--------
sum accno
----- ---------
[1 2] 10
[3 4] 20

I am receiving the above out as fixed vector

I required for the normal format like
1 2 10
3 4 20

Cany you please give your suggesitions.
m.ramakrishna
G.K.K
Participant
Posts: 61
Joined: Tue May 13, 2008 6:54 am

Post by G.K.K »

Hi murali,

when i tried the first job that you gave in job design, it i sthrowing the below warning:
Input dataset does not have field: "accno"

Thanks
G.k.K
murari83 wrote:
ray.wurlod wrote:You probably need a Split Vector stage. Check out the stages in the Restructure folder. ...
Hi Ray,

please verify the below information

Input
------
Accno name sum
10 a 1
10 a 2
20 b 3
20 b 4

Job design
-----------

Dataset --------------->Combine_records (stage)--------->dataset

key:accno
Subrecordoutout colum:Final

we getting this out put

final accno
----- -------
[(a 1) (a 2)] 10
[(b 3) (b 4) 20


after in out put i am using this stage

Dataset--------------------> split_subrecord------------>dataset


subrecod colum: final

out put
--------
sum accno
----- ---------
[1 2] 10
[3 4] 20

I am receiving the above out as fixed vector

I required for the normal format like
1 2 10
3 4 20

Cany you please give your suggesitions.
Post Reply