Can we do this transformation in datastage

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
sigma
Premium Member
Premium Member
Posts: 83
Joined: Thu Aug 07, 2008 1:22 pm

Can we do this transformation in datastage

Post by sigma »

The attached data file contains 3 columns in comma delimited format.

ENTITY
ACCOUNT number
AMOUNT

Take this file as input prepare the following output
ENTITY column value to be replaced by constant PC_SL_US.
ACCOUNT number column data within itself is delimited by a period and can have a maximum structure of X.Y.Z
This need to be parsed and put into more than one column (upto 3 different columns) . If only one value is present the next two columns should be blank and so on.
AMOUNT column take the input amount and output with only 2 decimal places . input can have more decimals .

The final output would be

ENTITY ( fill with constant PC_SL_US)
ACCOUNT NUMBER
BUSINESS UNIT
FUNCTIONAL AREA
AMOUNT
PERIOD (fill with constant 001/2009.

Column 2,3,4 is a split of input column 2 based on the period within the column. If input contains only account number 3 and 4 are blank or if input contains account number , business unit then 4 is blank or if input contains account number.business unit.functional area then all 2,3,4 are filled with values

Is transformer my best solution for doing this
girija
Participant
Posts: 89
Joined: Fri Mar 24, 2006 1:51 pm
Location: Hartford

Post by girija »

Yes you can.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Field() functions for the parsing and If..Then..Else to test for "blank".
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply