Page 1 of 1

Can DS load data into a type 'varray' field in Oracle?

Posted: Fri Feb 16, 2007 4:39 pm
by jherr22
I have an Oracle table that is defined with the following SQL:
create or replace type animal_array is varray(10) of varchar(30);
create table mytable ( field1 animals animal_array );

I want to insert into this table from a flat file that contains:
"('cat','dog','pig')"
"('frog','toad','snake')"
"('horse','bear','lion')"

Using SQL I could insert as follows:
insert into mytable values ( animals('cat','dog','pig'), animals('frog','toad','snake'), ... )

In selecting oracle fields (within Oracle Enterprise Stage), I do not see the option of a 'varray', or anything like it.
We are processing large quantities of spatial data. For example, a million polygons that are composed of Lats, Logs and Elevations.

Is there a way (even if I have to write a 'C' DS Routine) to do this within DataStage (using Seq File => Transform => Oracle Enterprise )? In other words, how do we end up with populated varray fields in an Oracle table?

Thanks
-- john (Lockheed Martin - Denver)
303-977-3944

Posted: Fri Feb 16, 2007 5:57 pm
by chulett
Never had to do anything like that. Have you tried declaring them as 30 character varchars and basically emulating your SQL example?

Posted: Fri Feb 16, 2007 7:32 pm
by ray.wurlod
Orchestrate does support the concepts of arrays and subrecords (refer to Chapter 2 of Parallel Job Developer's Guide for a brief overview). As to whether these map correctly through the Oracle Enterprise stage I can not say, as I have not tried it. I suspect that version 7.5 of DataStage only officially supports Oracle 9i.

I became a Premium member, but I can't see the info

Posted: Mon Feb 19, 2007 11:36 am
by jherr22
I paid for Premium membership.
I got the Email confirmation
Then I logged out, and logged back in.
And I saw "Order Pending Review"
How long does it take so that I can see the Premium messages?
-- john

Posted: Mon Feb 19, 2007 11:40 am
by DSguru2B
Email the Webmaster. Email address is under Contact