Four Stars

Extract Mysql MEDIUMBLOB (Image) one by one

Hi everyone, I am new to Talend.

Now I am working on a Mysql database which have a field containing images in the data type of MEDIUMBLOB.

I know that I have to set the date type to byte[] in the schema of the Mysql table, the output is tFileOutputRaw and also need to set the dynamic file name.

But what should be the set-up so that it can export the cells (the MEDIUMBLOB field) one by one to the tFileOutputRaw?

1 ACCEPTED SOLUTION

Accepted Solutions
Five Stars

Re: Extract Mysql MEDIUMBLOB (Image) one by one

Hello,

 

Please check the component tLOBDownload:

https://exchange.talend.com/#marketplaceproductoverview:marketplace=marketplace%252F1&p=marketplace%...

 

It should help you with your task, but be aware, that MySQL returns BLOB as byte [], so you need to convert it to BLOB data type.

Výstřižek.PNG

 

3 REPLIES
Five Stars

Re: Extract Mysql MEDIUMBLOB (Image) one by one

Hello,

 

Please check the component tLOBDownload:

https://exchange.talend.com/#marketplaceproductoverview:marketplace=marketplace%252F1&p=marketplace%...

 

It should help you with your task, but be aware, that MySQL returns BLOB as byte [], so you need to convert it to BLOB data type.

Výstřižek.PNG

 

Four Stars

Re: Extract Mysql MEDIUMBLOB (Image) one by one

Thank you very much for your help!

This is very tricky, in the future better just save the image path in the database.

Five Stars

Re: Extract Mysql MEDIUMBLOB (Image) one by one

You are welcome.

Saving pictures in RDBMS is not a good idea generally. There are better options where to store (e.g. some kind of Object Store).

 

Regards

Lojdr