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

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
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

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

Post 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
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Never had to do anything like that. Have you tried declaring them as 30 character varchars and basically emulating your SQL example?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
jherr22
Premium Member
Premium Member
Posts: 56
Joined: Mon Jan 29, 2007 3:24 pm
Location: Denver
Contact:

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

Post 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
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

Email the Webmaster. Email address is under Contact
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
Post Reply