I have a text file which have a name column it contains 140000 names starting from alphabe A-Z with duplicate entries
it want to load it into files asper the name (ie name starts with A into one file starts with B to another file ...........)
in sql we can achieve it by where names like "A%" same how to get in datastage
split the names
Moderators: chulett, rschirm, roy
You can split the stream using a switch or transform or filter stage (I'm sure that there are others I've overlooked)
<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:
Transformer or Filter stage with 26 outputs (one for each letter) and one rejects/otherwise link.
A Switch stage is not appropriate; it switches on specific values, so you might need 140000 separate switch conditions!
A Switch stage is not appropriate; it switches on specific values, so you might need 140000 separate switch conditions!
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.
-
- Premium Member
- Posts: 1044
- Joined: Wed Sep 29, 2004 3:30 am
- Location: Nottingham, UK
- Contact:
Could you pick out the first character in a prior stage, and split on that? (I don't know parallel stages)ray.wurlod wrote:A Switch stage is not appropriate; it switches on specific values, so you might need 140000 separate switch conditions!
Last edited by PhilHibbs on Wed Feb 27, 2008 6:22 am, edited 1 time in total.
Phil Hibbs | Capgemini
Technical Consultant
Technical Consultant
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
I was thinking of the Switch on the first letter, but as Ray has pointed out, you would need a transform/modify stage in the job, so you might as well use the transform to split the streams.
<a href=http://www.worldcommunitygrid.org/team/ ... TZ9H4CGVP1 target="WCGWin">
</a>
</a>