<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Image files into BLOB in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320105#M90277</link>
    <description>Here are screenshots of the job and inside the tMap
&lt;BR /&gt;
&lt;BR /&gt;In the tMap I have hardcoded the path of the pdf to insert as a blob for test purpose.
&lt;BR /&gt;Thx for your help</description>
    <pubDate>Fri, 12 Jun 2009 10:33:50 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-06-12T10:33:50Z</dc:date>
    <item>
      <title>Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320096#M90268</link>
      <description>Hello,&lt;BR /&gt;I have a list of jpg files I need to put in BLOB fields.&lt;BR /&gt;The name of the file corresponds to the ID of the datas to which the images owned. So I need to get the name of the jpg file, to compare it to the ID in the database and then to set the jpg file contains for the ID in the database.&lt;BR /&gt;I have written this job, but I have the following error (see attached files).&lt;BR /&gt;I think it's coming from the settings 'File Name' of the tFileInputDelimited_3.&lt;BR /&gt;Is the way of my job correct or am I totally wrong?&lt;BR /&gt;How can I do that?&lt;BR /&gt;Thanks&lt;BR /&gt;I use TOS 3.0.4</description>
      <pubDate>Sat, 16 Nov 2024 13:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320096#M90268</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320097#M90269</link>
      <description>I think there should be a "iterate" link between the tFileList and the tFileInputDelimited_3.&lt;BR /&gt;Then, the tFileInputDelimited is not a good idea to put the content of an image file in a BLOB : the image file contains binary data whereas tFileInputDelimited is reading text data.&lt;BR /&gt;You'll probably have to create your own tFileInputBinary component.</description>
      <pubDate>Thu, 28 May 2009 23:08:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320097#M90269</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-28T23:08:26Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320098#M90270</link>
      <description>Hello, 
&lt;BR /&gt;regarding that post 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCjGvCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-File-into-BLOB/td-p/67476&lt;/A&gt;, I'm not totally wrong. I agree that it will not works using the tFileInputDelimited_3. 
&lt;BR /&gt;But I don't know how to get in the same job (transaction) the name of the file to join it with the ID of PER_PERSONNE and the binary contain of the file. I must have twice in the input of the tMap_3. 
&lt;BR /&gt;If I put a "iterate" link between the tFileList and the tFileInputDelimited_3 I can't then put a link from the tMap_1 to tMap2 ou tMap_3. 
&lt;BR /&gt;I have the same problem If I put a link between the tFileProperties_2 and the tFileInputDelimited_3 
&lt;BR /&gt;Could somebody help me? 
&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 29 May 2009 09:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320098#M90270</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-29T09:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320099#M90271</link>
      <description>Hello mamouroux 
&lt;BR /&gt;From the error mesage, I see the error come from tFileInputDelimited_1, but I don't see this component in your job. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Sun, 31 May 2009 07:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320099#M90271</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-31T07:07:48Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320100#M90272</link>
      <description>Hello, 
&lt;BR /&gt;Sorry, I have found how to do, but now I have an other error: 
&lt;BR /&gt;Exception in component tOracleOutput_1 
&lt;BR /&gt;java.sql.SQLException: Type de colonne non valide 
&lt;BR /&gt;This error has been already explained in that topic, 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vD1CdCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/Issue-on-CLOB-or-BLOB-datatype-while-insert-in-oracle/td-p/65471&lt;/A&gt; 
&lt;BR /&gt;but I doesn't know how to use setBlob instead of setObject. 
&lt;BR /&gt;I can't change anything in the code. 
&lt;BR /&gt;Please could you explian me how to do that? 
&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 02 Jun 2009 13:01:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320100#M90272</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-02T13:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320101#M90273</link>
      <description>Hello 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;But I don't know how to create one. And, is it possible to call it from the tMap ?&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Go go Repository--&amp;gt;Code--&amp;gt;Routine and right click on 'Routine', then select 'create a new routine'. 
&lt;BR /&gt;For example, if you create a new routine call: 
&lt;BR /&gt;Forum6799 and there is a method in it: ByteArrayFromFile 
&lt;BR /&gt; 
&lt;PRE&gt;  package routines;&lt;BR /&gt;public class Forum6799 {&lt;BR /&gt;	public static Object ByteArrayFromFile(String filePath) {&lt;BR /&gt;		try {&lt;BR /&gt;			java.io.FileInputStream fis = new java.io.FileInputStream(filePath);&lt;BR /&gt;			byte[] incoming_file_data = new byte;&lt;BR /&gt;			fis.read(incoming_file_data);&lt;BR /&gt;			fis.close();&lt;BR /&gt;			return incoming_file_data;&lt;BR /&gt;		} catch (Exception err) {&lt;BR /&gt;			err.printStackTrace();&lt;BR /&gt;			return null;&lt;BR /&gt;		}&lt;BR /&gt;	}&lt;BR /&gt;}&lt;/PRE&gt; 
&lt;BR /&gt;Assuming the job looks like: 
&lt;BR /&gt;tFileInputDelimited--row1--tMap--tMysqlOutput 
&lt;BR /&gt;On tMap, set the talend type as Object and db type as Blob, call the routine on expression: 
&lt;BR /&gt;Forum6799.ByteArrayFromFile(row1.filePath) 
&lt;BR /&gt;Let me know if you have any questions!! 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 12 Jun 2009 10:04:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320101#M90273</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T10:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320102#M90274</link>
      <description>Hello, thx for the reply !&lt;BR /&gt;but now I have a java.lang.ClassCastException: [B cannot be cast to oracle.sql.BLOB</description>
      <pubDate>Fri, 12 Jun 2009 10:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320102#M90274</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T10:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320103#M90275</link>
      <description>Hello 
&lt;BR /&gt;Please upload some screenshots of your job, so I can see where do you make a mistake.
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 12 Jun 2009 10:19:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320103#M90275</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T10:19:54Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320104#M90276</link>
      <description>btw, I use TOS 3.1.1 and I previously this problem : 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCoznCAC" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/Copy-BLOB-from-ODBC-db-type-to-Oracle-schema/td-p/98739&lt;/A&gt; so I tried the solutions descrbied there and also the solution of 
&lt;A href="http://www.talendforge.org/bugs/view.php?id=7556" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/bugs/view.php?id=7556&lt;/A&gt; ( 
&lt;A href="http://talendforge.org/trac/tos/changeset/25260" rel="nofollow noopener noreferrer"&gt;http://talendforge.org/trac/tos/changeset/25260&lt;/A&gt;)</description>
      <pubDate>Fri, 12 Jun 2009 10:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320104#M90276</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T10:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320105#M90277</link>
      <description>Here are screenshots of the job and inside the tMap
&lt;BR /&gt;
&lt;BR /&gt;In the tMap I have hardcoded the path of the pdf to insert as a blob for test purpose.
&lt;BR /&gt;Thx for your help</description>
      <pubDate>Fri, 12 Jun 2009 10:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320105#M90277</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T10:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320106#M90278</link>
      <description>I have some news : 
&lt;BR /&gt;I have to modify the file TOS-All-r24830-V3.1.1\plugins\org.talend.designer.components.localprovider_3.1.1.r24830\components\templates\db_output_bulk.skeleton around line 755 because it uses setBLOB which isnt valid 
&lt;BR /&gt;If try to just rename it to setBlob then the generated code is : 
&lt;BR /&gt; 
&lt;PRE&gt;pstmt_tOracleOutput_1.setBlob(39,(oracle.sql.BLOB) dict_info.DICTFR_PIECE_JOINTE);&lt;/PRE&gt; 
&lt;BR /&gt;then i got this problem : 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tOracleOutput_1&lt;BR /&gt;java.lang.ClassCastException: ) dict_info.DICTFR_PIECE_JOINTE),((byte[])dict_info.DICTFR_PIECE_JOINTE).length);&lt;/PRE&gt; 
&lt;BR /&gt;and I got this error : 
&lt;BR /&gt; 
&lt;PRE&gt;Exception in component tOracleOutput_1&lt;BR /&gt;java.sql.SQLException: Connexion interrompue&lt;BR /&gt;	at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)&lt;BR /&gt;	at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)&lt;BR /&gt;	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)&lt;BR /&gt;	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)&lt;BR /&gt;	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:271)&lt;BR /&gt;	at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:445)&lt;BR /&gt;	at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3127)&lt;BR /&gt;	at oracle.jdbc.driver.PhysicalConnection.prepareStatement(PhysicalConnection.java:3042)&lt;BR /&gt;	at dict.test_0_1.test.tFileList_1Process(test.java:3734)&lt;BR /&gt;	at dict.test_0_1.test.tOracleConnection_1Process(test.java:369)&lt;BR /&gt;	at dict.test_0_1.test.runJobInTOS(test.java:6458)&lt;BR /&gt;	at dict.test_0_1.test.main(test.java:6359)&lt;/PRE&gt; 
&lt;BR /&gt;but this time the row is inserted in oracle and i'm able to get the pdf with oracle sqldevelopper.</description>
      <pubDate>Fri, 12 Jun 2009 11:35:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320106#M90278</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T11:35:16Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320107#M90279</link>
      <description>Hello
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;java.sql.SQLException: Connexion interrompue&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;The previous connection haven't been closed when you iterate the next file and create a new connection. Generally, you are required to use a tOracleCommit to close the connection after the job.
&lt;BR /&gt;Add a tOracleCommit after tOracleOutput,
&lt;BR /&gt;.........tOracleOutput--OnComponentOK--&amp;gt;tOracleCommit
&lt;BR /&gt;Best regards
&lt;BR /&gt; 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 12 Jun 2009 14:23:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320107#M90279</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T14:23:27Z</dc:date>
    </item>
    <item>
      <title>Re: Image files into BLOB</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320108#M90280</link>
      <description>thx a lot, it now works !</description>
      <pubDate>Fri, 12 Jun 2009 14:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Image-files-into-BLOB/m-p/2320108#M90280</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-06-12T14:56:17Z</dc:date>
    </item>
  </channel>
</rss>

