SQL Server BLOB

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
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

SQL Server BLOB

Post by rasi »

Hi,

Is is possible to user Sql Server BLOB object inside DS.

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

Post by ray.wurlod »

No.
INSIDE DataStage (which was your question) you can only work with numeric and string data types.
(What transformation would you apply to a BLOB? :) )
You can use DataStage to move a BLOB, but you must encode it in some form that DataStage can use. And, of course, you must decode it once it arrives at its destination, which must be somewhere that the BLOB makes sense.
rasi
Participant
Posts: 464
Joined: Fri Oct 25, 2002 1:33 am
Location: Australia, Sydney

Post by rasi »

Thanks Ray,

But how will you move the blob from SQL Server to some folder destination. Also the content which is inside is XML.

Thanks
Rasi
No.
INSIDE DataStage (which was your question) you can only work with numeric and string data types.
(What transformation would you apply to a BLOB? :) )
You can use DataStage to move a BLOB, but you must encode it in some form that DataStage can use. And, of course, you must decode it once it arrives at its destination, which must be somewhere that the BLOB makes sense.
csimms
Participant
Posts: 14
Joined: Wed Nov 13, 2002 6:46 pm

Post by csimms »

Rasi,

We encountered the same problem. We needed to be able to insert and retrieve binary objects from a database. The solution that worked best for us was to write our own custom plug-in passive stage that handled the database connection via ODBC. Using a custom plug-in allowed us to implement the required input/output code needed for binary data type manipulation. Once the plug-in was completed, and since the DataStage already facilitates the movement of binary data along a link, our work was completed. The downside of writing and using a custom plug-in is that it is your responsibility to support it. I guess what I am saying here does not offer much direct help to you and your situation, but I wanted to mention to you another possible solution.


Chris Simms

Senior Systems Engineer
Extended Technologies Corporation
9708 Skillman Road
Dallas, TX 75243
csimms@xtekcorp.com
www.xtekcorp.com
214-540-4108 (Desk)
214-540-4000 (Front Desk)
214-540-4004 (Fax)
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The approach I was suggesting is, for example, to hex encode the BLOB so that each byte is represented by a pair of (printable) hex characters, and move that. This can be accomplished by a number of utilities. The same functionality is available in DataStage with the "MX0C" specification for Iconv() and Oconv() functions. Perhaps, though I have not tried this, you could CAST the BLOB as a sufficiently large VarChar when selecting it from SQL Server; this certainly works for uniqueidentifier data type in SQL Server.
Post Reply