how to convert a one column input to multiple column
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 4
- Joined: Tue May 20, 2014 4:05 am
- Location: chennai
- Contact:
how to convert a one column input to multiple column
hi i have situation like below.
I/P
NAME
ssak
O/P
NAME
s
s
a
k
how do i do this.. pls guide me..
I/P
NAME
ssak
O/P
NAME
s
s
a
k
how do i do this.. pls guide me..
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
When is the interview?
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 4
- Joined: Tue May 20, 2014 4:05 am
- Location: chennai
- Contact:
Re: how to convert a one column input to multiple column
already attended.. and myself also need to get clarification on this.. how to do it transformers.. if other languages like c, cpp worked.. but not in ds.. pls dont tease me, if possible clarify ..
-
- Premium Member
- Posts: 536
- Joined: Thu Oct 11, 2007 1:48 am
- Location: Bangalore
Hi,
Please let us know what was your approach to get the output.
Please let us know what was your approach to get the output.
Thanks
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
Prasoon
ETL Consultant
LinkedIn :- http://www.linkedin.com/profile/view?id ... ab_pro_top
Blog:- http://dsshar.blogspot.com/
-
- Participant
- Posts: 4
- Joined: Tue May 20, 2014 4:05 am
- Location: chennai
- Contact:
Re: how to convert a one column input to multiple column
its its multiple columns to multiple rows, instead of pivot stage i will use transformers and use loop variable and do that..
or else, if the input was like s,s,a,k.. then i use str function and its possible to split
but here, im little bit confused
or in the tension i may unable to find out the solution.. pls guide me in this situation..
i need guidance to solve this kind of inputs...
or else, if the input was like s,s,a,k.. then i use str function and its possible to split
but here, im little bit confused
or in the tension i may unable to find out the solution.. pls guide me in this situation..
i need guidance to solve this kind of inputs...
This is a good place to use the loop functionality in a Transform stage.
In the Loop While condition put in "@ITERATION <= LEN(InColumn.InputString)"
Then in the Output just specify "InColumn.InputString[@ITERATION,1]" to put one character per row
In the Loop While condition put in "@ITERATION <= LEN(InColumn.InputString)"
Then in the Output just specify "InColumn.InputString[@ITERATION,1]" to put one character per row
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What's the business case behind the requirement? That may assist in deciding the most appropriate algorithm - there are at least five different ways to solve this one.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 4
- Joined: Tue May 20, 2014 4:05 am
- Location: chennai
- Contact:
Re: how to convert a one column input to multiple column
got the idea how to do it.
get the input in stage variable
len(inputcol) = stagevariabl
looping
@iteration = stagevariable
right(left(inputcol,@iteration),1) - loopvar
loopvar - O/P
with guidance through my friend.
get the input in stage variable
len(inputcol) = stagevariabl
looping
@iteration = stagevariable
right(left(inputcol,@iteration),1) - loopvar
loopvar - O/P
with guidance through my friend.