loading sequential file to Oracle CLOB

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
SwathiCh
Premium Member
Premium Member
Posts: 64
Joined: Mon Feb 08, 2010 7:17 pm

loading sequential file to Oracle CLOB

Post by SwathiCh »

I am given a requirement to load a sequential file to oracle table.
The sequential file has 133 rows, each row has a final delimiter end.
In the Oracle table, there are two coulmns
1.Clob column
2.filename column.

In the clob column , I need to load load the entire 133 rows as a single row..

When I loaded the data, it is loaded as 133 rows in clob.

Is the requirement a valid one? Can we really achieve this requirement (loading 133 rows delimited by end character into oracle clob as a single row)?
--
Swathi Ch
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

You might have to play around with the definitions a bit, but it is workable.

Try setting the variable type on your field to LongVarChar with a length > 32K (the Oracle API stage requires it, not certain about other stages).

Also - try setting the file properties (Format Tab) to have a Record Level, Record Type property of "implicit". That should read in the entire file as one big string.

You'll have to pass in your filename as a parameter and add that as the second field in a transformer.

Let me know if it works - don't have access to Oracle at this site.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
SwathiCh
Premium Member
Premium Member
Posts: 64
Joined: Mon Feb 08, 2010 7:17 pm

Post by SwathiCh »

Thanks for your reply,

I tried to read the sequential file by using the below options
Record level:
final delimeter-none
record type- Implicit
Field defaults:
Delimeter - none
Quote - none

I have defined only one column in the sequential as record1 longvarchar(10000000).

After setting this options I could read the sequential file as 40 rows instead of a single row. Is there any other option i need to set in the properties?
--
Swathi Ch
Post Reply