Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to extract the images stored in blob from MYSql database and store it in local file system.
I have used tLOBDownload component for executing this job.
But while running this job i am getting the below mentioned error:
Error:
Exception in component tLOBDownload_1 (BlobDb_to_XML)
java.lang.Exception: Given object is not a Blob. It is of type:[B
at de.cimt.talendcomp.lob.download.LOBDownload.downloadLob(LOBDownload.java:136)
at newproject.blobdb_to_xml_0_1.BlobDb_to_XML.tDBInput_1Process(BlobDb_to_XML.java:690)
at newproject.blobdb_to_xml_0_1.BlobDb_to_XML.runJobInTOS(BlobDb_to_XML.java:1072)
at newproject.blobdb_to_xml_0_1.BlobDb_to_XML.main(BlobDb_to_XML.java:907)
I have attached the screenshot of the job.
Please help me with this issue.
Hi,
I have some more requirements in my job.
I have attached the screenshot of the job.
I need to extract the blob images in the same archive folder where my output XML file is getting stored.
Is it possible to do that in a single job?
I am not able to connect my tLOBDownload to tArchive.
Please help.
Hi,
Can you please provide your feedback on the above issue.
Awaiting your response.
This is a data type problem, specific with using tLOBDownload with MySQL.
Mysql provides the output as Byte[] and tLOBDownload wants a Java Object (specifically a blob). To do the conversion:
1) Add a tMap to your job
2) Set the blob column type in your input schema as byte[] and your output column type to Object
3) Map your column with the following method call:
new javax.sql.rowset.serial.SerialBlob(row1.myblobcolumn)
(obviously replace the column name with your column name).
Details on this method in the Java Docs are here::