Spliiting a single row into multiple row

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
goutam
Premium Member
Premium Member
Posts: 109
Joined: Thu Jul 26, 2007 6:53 am

Spliiting a single row into multiple row

Post by goutam »

Hi folks,

I have the following requirement.
I have two input columns. ASSET_ID and DESC. Length of DESC field is not fixed. Output columns are same but with a fixed length of DESC field.

input row 100, WEBER MARKING SYSTEMS INC
output row should be
100, WEBER MARK
100, KING SYSTE
100, MS INC

i.e splitting the DESC field with a length of 10.
Can it be accomplished this thru transformer? If yes how?
if no, please give any ideas.
Goutam Sahoo
girija
Participant
Posts: 89
Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford

Post by girija »

What will be the max length of your input DESC?
goutam
Premium Member
Premium Member
Posts: 109
Joined: Thu Jul 26, 2007 6:53 am

Post by goutam »

girija wrote:What will be the max length of your input DESC?
i am reading DESC column value with longvarchar datatype.Precision is 999999.
Goutam Sahoo
mystuff
Premium Member
Premium Member
Posts: 200
Joined: Wed Apr 11, 2007 2:06 pm

Post by mystuff »

you have to use a function and loop around it.
goutam
Premium Member
Premium Member
Posts: 109
Joined: Thu Jul 26, 2007 6:53 am

Post by goutam »

mystuff wrote:you have to use a function and loop around it.
what kind of function??? can you please be more specific on your idea?

I was trying to solve it using buildop stage. But got stuck in string manipulation. I was using string conctenation function available in C. but there was some compilation problem.

Can anybody tell me what all function are available under APT_string header file.?
Goutam Sahoo
goutam
Premium Member
Premium Member
Posts: 109
Joined: Thu Jul 26, 2007 6:53 am

Post by goutam »

mystuff wrote:you have to use a function and loop around it.
Thanks to all of you. I resoved the problem using build stage.
Goutam Sahoo
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Would you care (a) to mark the thread as Resolved, and (b) to share your solution?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
budde43
Participant
Posts: 5
Joined: Tue Jul 29, 2008 2:08 pm

Tell the solution

Post by budde43 »

Hi

Can you give the solution for your problem .How did you solved it,I think it is usefull for me.

Thanks
Post Reply