Upload to FTP only uploads one out of three rows

Four Stars

Upload to FTP only uploads one out of three rows

Hello to all!


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:


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!!!


Community Manager

Re: Upload to FTP only uploads one out of three rows

Iterate each row and put the image to FTP one by one, change your job to:

You can get the current imageID with this expression:

on tMssqlInput2, select the current row,
"select * from tableName where imageID="+(Integer)globalMap.get("row1.imageID)


Talend | Data Agility for Modern Business

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now


Introduction to Talend Open Studio for Data Integration.


Downloads and Trials

Test drive Talend's enterprise products.


Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.