Page 1 of 1

Parse Oracle Function with Dataset

Posted: Fri Mar 13, 2015 4:54 am
by pavans
Dear All,

I have a Oracle function and the result from the below query is:

select id, sid, x.leg_rows from table(XXXX.XXXXXXXXXX.XYZZZFULLINFO(systimestamp - 1)) x

id sid leg_rows
475387 113905940 (DATASET)
475388 113905940 (DATASET)

the leg_rows consists of multiple rows within the dataset corresponding to a sid.
So When I double click the Dataset in TOAD I have the below rows. for ex.

sid type amt flag
113905940 A 100 P
113905940 B 200 R
113905940 C 300 P

The requirment is to parse the Dataset and get the required value. i.e.,
for a sid I need to get the amount of type 'A' into one target column and
get amount of flag 'R' into another target column so on.

There are many others columns in the Dataset.

Output :

id sid amount_type amt_flag
475387 113905940 100 200


Can Datastage support reading the Dataset like above?
Any ideas to begin is greatly appreciated.

Thanks in Advance.

Posted: Fri Mar 13, 2015 3:38 pm
by ray.wurlod
Can't see why not. What have you tried?