MSSQL BLOB to image and then upload to FTP

Four Stars

MSSQL BLOB to image and then upload to FTP

Hello to all!

 

Talend Open studio Data integration 6.2.1

 

I have a MSSQL table called itemImages which has the below columns:

ImageID, productID, Image

The image column is blob where a jpg image is stored.

 

What I want is to convert the blob to jpg image and then upload it to an ftp as jpg.

 

What i have already did:

Group1:

1. tMSSqlInput which inserts the sql rows of the itemImages table

2. tSetGlobalVar which sets a name foreach row with the key "filename" and value (String)row1.imageID

so it gives every row a variable of the imageID which I want it later for filename.

Group2 (on subjobOK):

1. Again the same tMSSqlInput

2. tLOBDownload which converts the blob to file jpg

3. tFTPPut which uploads the converted jpg files to the FTP

 

The job is working, it gives each blob a filename (the id) and then it uploads to FTP.

The problem is that even if the tFTPPut says that 3 rows are proccessed, it only uploads one file out of three.

 

If I set the component tLOBDownload to also save to the local drive of my computer it saves all three jpg files with different filenames based of the id of each one, correctly.

But at the FTPPut uploads only one of them.

 

Do I need any kind of loop for the job to upload all the rows at the FTP?

 

Thank you in advance for the help!!!

 

mssql-blob.jpg

Four Stars

Re: I am unable to Download the Images From Databse

 

I got the Exception as  Given object is not a Blob. It is of type:[B 

at de.cimt.talendcomp.lob.download.LOBDownload.downloadLob

Error.PNG

Please tell me the Step by Step to Create the Job for download images from Database.

 

 

Thank you..

 

 

Moderator

Re: MSSQL BLOB to image and then upload to FTP

Hello,

The component tFTPPut is a typically used as a single-component sub-job but can also be used as output component. You can connect Iterate flow from tFilelist to tFTPPut in order to transfer files to an FTP server from local.

Here is a related topic:https://community.talend.com/t5/Design-and-Development/SFTP-multiple-files-using-tFTPPut/m-p/118936.

Best regarda

Sabrina

 

 

 
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: MSSQL BLOB to image and then upload to FTP

Tqqq for your reply .

But I need to download images from MySQL database to local computer using
tLobDownload ..

Please suggest me how to do the talend job step by step.

Thank you..