Spliting Record in to multiple columns

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
ysrini9
Participant
Posts: 108
Joined: Tue Jul 12, 2005 2:51 am

Spliting Record in to multiple columns

Post by ysrini9 »

Hi All,

I have a requirement like 1 -record need to be split into mutiple columns

Ex:Record:Batch 2|| incident ||casue||0001-10-09 00:00:00(Database)

I need to populate data according the table columns

==============================
Column name Datavalue
==============================
Batch Batch2
group incident
reason Cause
Date 0001-10-09 00:00:00
===================================

Please suggest me which stage i need to use and impliment

Thanks and Regards
Srini
WoMaWil
Participant
Posts: 482
Joined: Thu Mar 13, 2003 7:17 am
Location: Amsterdam

Post by WoMaWil »

use transformer stage
Wolfgang Hürter
Amsterdam
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Specifically the Field() function can be used to break up your pipe delimited string. Because of the double pipes, you'll need to adjust your 'field number' accordingly. For example, "incident" would be the third (not second) field.

The 'sub fields' could then be broken further down using the same function.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply