Different delimiters within a record

Formally known as "Mercator Inside Integrator 6.7", DataStage TX enables high-volume, complex transactions without the need for additional coding.

Moderators: chulett, rschirm

Post Reply
kunal1101
Participant
Posts: 8
Joined: Mon Dec 03, 2007 11:50 pm
Location: Pune

Different delimiters within a record

Post by kunal1101 »

Hi....
i am again back with delimiters...
what is the workaround if i have different delimiters to seprate fields within a record?
for ex.:- i have data as:-
CustomerID;ABCWIDGET~ABC Widgets, Inc.

where my first delimiter is ';' between customerid and ABCWIDGET and second delimiter is ~ between ABCWIDGET and ABC Widgets, Inc.

I tried specifying different seprators while defining the above mentioned indiviual items.But my problem lies in what complonent syntax i should have for the group containing above items?.It should be surely delimited and i cant specify more than one delimiter.
:?
Please help.
Kunal_devil!!!
mdan
Charter Member
Charter Member
Posts: 46
Joined: Mon Apr 28, 2003 4:21 am
Location: Brussels
Contact:

Re: Different delimiters within a record

Post by mdan »

Hi,
you may use 2 successive "column importer" stages:
- read the file as a single (long) line - varchar
- the first one has as delimiter the ';' char, and the second group is imported as one single column
- the second one it will have '~' as delimiter, using as input column the second group; map only the previously imported columns

You can do the same split using a transformer and field func (if you don't want to use column importer).

Dan
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

mdan this is dstx forum.
janhess
Participant
Posts: 201
Joined: Thu Sep 18, 2003 2:18 am
Location: UK

Post by janhess »

mdan this is dstx forum.

CustomerID;ABCWIDGET~ABC Widgets, Inc.

You can create a group containing 2 groups
First contains Item CustomerID and Group Widget with ; delimiter
Second contains items widget name and widget company with ~ delimiter
kunal1101
Participant
Posts: 8
Joined: Mon Dec 03, 2007 11:50 pm
Location: Pune

Post by kunal1101 »

thanx janhess 8)
Kunal_devil!!!
Post Reply