How to read and write BLOB datatype in datastage 8.1

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
nkk.nmanchanda246
Participant
Posts: 1
Joined: Fri Nov 26, 2010 3:42 am
Location: B-85,2ND FLOOR, NEHRU VIHAR, NEAR TIMARPUR, NEW DELHI-110054

How to read and write BLOB datatype in datastage 8.1

Post by nkk.nmanchanda246 »

Hi All,

I would like to ask, how to read and write BLOB datatype in Datastage 8.1. Please let me know the procedure. I have one column in my source which contains BLOB datatype.

Regards,
Nitin.
Regards,
DS User
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

BLOB is not supported for most stages. In Connector stages you can specify to use references to LOB data types.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
leggend
Participant
Posts: 6
Joined: Tue May 27, 2008 7:23 am

Re: How to read and write BLOB datatype in datastage 8.1

Post by leggend »

nkk.nmanchanda246 wrote:Hi All,

I would like to ask, how to read and write BLOB datatype in Datastage 8.1. Please let me know the procedure. I have one column in my source which contains BLOB datatype.

Regards,
Nitin.
hey,

you can use rdbms stage.

Regards,

Y. BELMOKHTARE
Marley777
Premium Member
Premium Member
Posts: 316
Joined: Tue Jan 27, 2004 3:26 pm

Post by Marley777 »

We are loading and reading clob fields not blob fields, but can only assume they are the same thing. I'll tell you what we're doing; maybe it will help someone.

We load XML into a CLOB field. To load the xml into a clob field we read an xml file from the server. The entire xml file is read into a field within a sequential file stage defined as LongVarChar. Length will need to be big enough to hold your largest file. You can do some 'ls' commands in the directory where the files exist to see what the length should be or 'WC fielname'. We then send the data/xml down the pipeline into a table using a DB2 UDB connector. The field should remain LongVarChar in the datastage metadata.

On the DB2 table the field is defined as a CLOB field with datatype CLOB(1048576).

When reading the CLOB field from the table the field once again should be LongVarChar in your metadata.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Another, rather old-fashioned, approach is to treat them as very long (perhaps even unbounded) VARCHAR and apply hex conversion (for example RAWTOHEX in Oracle, HEX in MySQL) while extracting, and use the reverse functions when loading.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply