How Do i Load Data into a Nested Table in Oracle?

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
rachit82
Premium Member
Premium Member
Posts: 41
Joined: Thu Jul 17, 2008 9:49 am

How Do i Load Data into a Nested Table in Oracle?

Post by rachit82 »

I need to load data into a nested table in Oracle. The columns are:

Key A B C D

The key column is the only normal column. A,B,C,D are all objects and are part of the nested table.

I contacted IBM and they said DataStage 7.5.2 cannot do this. Object Based Database concepts are atleast 10yrs old. So there must be someone who must have worked on this.

When i do a view data, Oracle OCI gives error msg that unknown data types. DataStage column definitions also consider the Objects in Each CompleX Column as Unkown Data Types.

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

Post by ray.wurlod »

Welcome aboard. DataStage is also more than 10 years old. How would you load data into a nested table using sqlplus? Use the same SQL as user-defined SQL in an OCI stage. View Data will almost certainly not work, for the same reasons that a standard SELECT statement in sqlplus will not work. There are "tricks" to extracting from nested tables (unless you use a database that more fully understands the nested table model, such as UniVerse or UniData).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rachit82
Premium Member
Premium Member
Posts: 41
Joined: Thu Jul 17, 2008 9:49 am

Post by rachit82 »

Thats the funny part. My Source Database is UniVerse. I am trying to put the denormalized data into Oracle Nested Tables to resolve the normalization problem. If i do the normalization, i am blowing up 28 million records to 133 million records in Oracle. The Load time is 24 hours and i need options.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

I'm surprised that 133 million records are taking that long. How are you loading them? Any reason not to use sqlldr (Oracle bulk load stage)?

Do the data have to be normalized into Oracle, or would you be happy with, say, comma-delimited strings? In that case simply convert the value marks of multi-valued fields into commas, either during extraction or using a Convert() function in DataStage.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rachit82
Premium Member
Premium Member
Posts: 41
Joined: Thu Jul 17, 2008 9:49 am

Post by rachit82 »

DataStage server does not have enough space for Staging tables for sql loader. Plus one of the old timers read somewhere that Oracle may do away with SQL Loader and he wont sign off on my project for that reason.

I am normalizing the data on datastage server and have changed the minimum modulus and large record size for optimum performance. But OCI stage can do only this much. i feel as if i am hitting a brick wall.

I did put the data into ORacle without normalizing with * instead of VM. But i could not go forward and normalize it. This data is crucial as it is coming from the transactional database and downstream applications are heavily dependent on this data.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

rachit82 wrote:Plus one of the old timers read somewhere that Oracle may do away with SQL Loader and he wont sign off on my project for that reason.
That's just crazy talk. :?
-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 »

If Oracle do do away with sqlldr it will only be to replace it with something faster/better. Would you like us to start some counter-rumour that you can challenge your old-timer with - maybe that no-one over 35 will be permitted to work in IT after 2012 so as to guarantee jobs for young people?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
rachit82
Premium Member
Premium Member
Posts: 41
Joined: Thu Jul 17, 2008 9:49 am

Post by rachit82 »

I asked IBM and they said DataStage cannot load data into nested tables. If we need this functionality, we need to upgrade to 8.1. So that settles the matter. They did not seem open to any work around or patches. I am going with the SQL Loader and i have gathered some support from the DBAs. We should be fine.

Thanks a lot for the inputs.
Post Reply