<?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: [resolved] Create file from a blob input (oracle db) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251587#M35486</link>
    <description>I've not tried this with jpgs but I have recently been working with MS Docs stored in a db. I simply used the tFileOutputRaw to do this. Just supply it your blob data as an object and it should work.</description>
    <pubDate>Thu, 30 Apr 2015 16:46:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-04-30T16:46:17Z</dc:date>
    <item>
      <title>[resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251585#M35484</link>
      <description>Hi, 
&lt;BR /&gt;I would like to create a picture (.jpg) from the blob data of an oracle table. 
&lt;BR /&gt;I have an oracle input that connects to the table "Photo" and retrieve the column "data" of type Blob. 
&lt;BR /&gt;How can I create the picture with this Blob data ? 
&lt;BR /&gt;I tried with a tMap and tJava, but the tMap will convert the blob into an "Object", so I don't know how I can work with this... 
&lt;BR /&gt;Thanks in advance for the help 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Thomas</description>
      <pubDate>Thu, 30 Apr 2015 16:02:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251585#M35484</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-30T16:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251586#M35485</link>
      <description>There is currently only one way to do this: use the custom component tLOBDownload
&lt;BR /&gt;
&lt;A href="https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&amp;amp;pi=marketplace%252F1%252Fproducts%252F559%252Fitems%252F838" rel="nofollow noopener noreferrer"&gt;https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&amp;amp;pi=marketplace%252F1%252Fproducts%252F559%252Fitems%252F838&lt;/A&gt;</description>
      <pubDate>Thu, 30 Apr 2015 16:30:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251586#M35485</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-30T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251587#M35486</link>
      <description>I've not tried this with jpgs but I have recently been working with MS Docs stored in a db. I simply used the tFileOutputRaw to do this. Just supply it your blob data as an object and it should work.</description>
      <pubDate>Thu, 30 Apr 2015 16:46:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251587#M35486</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-04-30T16:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251588#M35487</link>
      <description>I actually started to reply to this before jlolling wrote his response. Since reading his post, I have double checked my response and have found that it isn't quite as easy as I made out. But I have a solution which makes it pretty straight forward. 
&lt;BR /&gt;The job I put together looks like this... 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDSB.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155721i4EC1EE59BF0A7959/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDSB.png" alt="0683p000009MDSB.png" /&gt;&lt;/span&gt;I am receiving an image (as a Blob) and an ID from the db input. The code in the tJavaRow converts the blob to a byte array. The byte array is then sent to the tFileOutputRaw and that produces the file successfully. The Java used in the tJavaRow is below.... 
&lt;BR /&gt;ByteArrayOutputStream baos = new ByteArrayOutputStream(); 
&lt;BR /&gt;java.sql.Blob blob = (java.sql.Blob)input_row.IMAGE; 
&lt;BR /&gt;byte[] buf = new byte; 
&lt;BR /&gt;java.io.InputStream in = blob.getBinaryStream(); 
&lt;BR /&gt;int n = 0; 
&lt;BR /&gt;while ((n=in.read(buf))&amp;gt;=0) 
&lt;BR /&gt;{ 
&lt;BR /&gt;baos.write(buf, 0, n); 
&lt;BR /&gt;} 
&lt;BR /&gt;in.close(); 
&lt;BR /&gt;byte[] bytes = baos.toByteArray(); 
&lt;BR /&gt;output_row.IMAGE = bytes; 
&lt;BR /&gt;output_row.ID = input_row.ID;</description>
      <pubDate>Fri, 01 May 2015 00:35:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251588#M35487</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-01T00:35:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251589#M35488</link>
      <description>Thank you both for your answers. I will try both solutions.&lt;BR /&gt;Thomas</description>
      <pubDate>Mon, 04 May 2015 13:40:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251589#M35488</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-04T13:40:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251590#M35489</link>
      <description>Hi, 
&lt;BR /&gt;Your method works fine rhall, the only problem (which in my case is quite important) is this: 
&lt;BR /&gt;I have my javarow linked directly to the fileoutputraw, and I defined the name that the file will have in the javarow... How can I get the value of the variable from the javarow in the fileoutputraw ? (I already tried with context, but I will save iteratively many photos, so the name is changing dynamically)? 
&lt;BR /&gt;Thanks in advance for the help! 
&lt;BR /&gt;Thomas</description>
      <pubDate>Tue, 05 May 2015 08:17:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251590#M35489</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-05T08:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251591#M35490</link>
      <description>Hi Thomas,
&lt;BR /&gt;You can use the globalMap hashmap. Calculate the filename in your javarow component and then save it to the globalMap variable like below....
&lt;BR /&gt;globalMap.put("filename", "myFile.jpg")
&lt;BR /&gt;.... then when you want to use it in the file component, retrieve the value like below....
&lt;BR /&gt;((String)globalMap.get("filename"))
&lt;BR /&gt;Regards
&lt;BR /&gt;Richard</description>
      <pubDate>Tue, 05 May 2015 09:06:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251591#M35490</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-05T09:06:39Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251592#M35491</link>
      <description>Hi rhall, 
&lt;BR /&gt;Thank you very much for your time. 
&lt;BR /&gt;Actually, I already tried this solution, but even tough the system.out.println swears that the "filename" path is correct in the javarow, the tfileoutputraw gives me a nullpointerexception ... 
&lt;BR /&gt;With 3 iterations, here is a sample of my code: 
&lt;BR /&gt;output_row.PATH = context.dir_photos+input_row.CODE_LOGIQUE+".jpg"; //comes from a tmap 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;globalMap.put("filename", output_row.PATH); 
&lt;BR /&gt;System.out.println((String)globalMap.get("filename")); //works correctly 
&lt;BR /&gt;And the execution is the following: 
&lt;BR /&gt; connecting to socket on port 4057 
&lt;BR /&gt; connected 
&lt;BR /&gt;/Users/talias/Desktop/mssql/photos/ULR_40244.jpg 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt;/Users/talias/Desktop/mssql/photos/ULR_40244.jpg 
&lt;BR /&gt;/Users/talias/Desktop/mssql/photos/ULR_40244.jpg 
&lt;BR /&gt;java.lang.NullPointerException 
&lt;BR /&gt; disconnected 
&lt;BR /&gt;I guess I missed something ?^^ 
&lt;BR /&gt;Thomas</description>
      <pubDate>Tue, 05 May 2015 09:20:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251592#M35491</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-05T09:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251593#M35492</link>
      <description>Ah yes, I forgot about this. There is a hack to get round this irritating issue with dynamic file names. You need to use a tFlowToIterate followed by a tIterateToFlow. I have changed my job to look like below.... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDUo.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/149993i039CDF6936356490/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDUo.png" alt="0683p000009MDUo.png" /&gt;&lt;/span&gt;In the tJavaRow I have created an extra String output where I create and output my filename. The tFlowToIterate puts the byte[] content and filename string into the globalMap hashmap. Then the tIterateToFlow takes them one row at a time and creates a flow out of them. This is then sent to the tFileOutRaw and allows it to create a new file for each row. 
&lt;BR /&gt;The tIterateToFlow is configured as below.... 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDK7.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154527i4C320D80E536F76B/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDK7.png" alt="0683p000009MDK7.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;The tFileOutputRaw is configured as below.... 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MDMg.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134048i497084759A2F1484/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MDMg.png" alt="0683p000009MDMg.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;This should work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;</description>
      <pubDate>Tue, 05 May 2015 09:52:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251593#M35492</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-05T09:52:30Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251594#M35493</link>
      <description>-POST EDITED- 
&lt;BR /&gt;I thought I had an error, but it looks like I also had to cast my row.FILEPATH to string (not just the row.IMAGE). 
&lt;BR /&gt;It finally works, you helped me a lot, thank you very much ! 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Thomas</description>
      <pubDate>Tue, 05 May 2015 10:17:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251594#M35493</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-05-05T10:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251595#M35494</link>
      <description>Hi ,&lt;BR /&gt;I am trying to retrieve text file from oracle database , trying to do it as shown above .&lt;BR /&gt;But there is a problem with the schema in tjavarow "cannot cast from byte to blob".&lt;BR /&gt;please help!&lt;BR /&gt;TIA&lt;BR /&gt;Hachi</description>
      <pubDate>Fri, 23 Oct 2015 14:57:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251595#M35494</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-10-23T14:57:14Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251596#M35495</link>
      <description>Hi do you know if this Component is comptible with TOS DI 6.1?&lt;BR /&gt;I have an error message "Component not loaded"</description>
      <pubDate>Fri, 11 Dec 2015 10:03:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251596#M35495</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-11T10:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251597#M35496</link>
      <description>The best way to download BLOBs is using the custom component tLOBDownload from Talend Exchange:
&lt;BR /&gt;
&lt;A href="https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&amp;amp;pi=marketplace%252F1%252Fproducts%252F559%252Fitems%252F838" rel="nofollow noopener noreferrer"&gt;https://exchange.talend.com/#marketplaceproductoverview:gallery=marketplace%252F1&amp;amp;pi=marketplace%252F1%252Fproducts%252F559%252Fitems%252F838&lt;/A&gt;
&lt;BR /&gt;This component is exactly made for this use case.</description>
      <pubDate>Fri, 11 Dec 2015 10:53:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251597#M35496</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-11T10:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251598#M35497</link>
      <description>&lt;P&gt;It Showing only the images names .The images are not downloading ..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I followed&amp;nbsp;&amp;nbsp;Your Steps to download images from database. Please guide me how do this &lt;U&gt;T&lt;/U&gt;alend job &lt;STRONG&gt;or&lt;/STRONG&gt; Could You share your job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you..&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lsn8"&gt;Image_Extract.PNG&lt;/A&gt;</description>
      <pubDate>Sat, 12 May 2018 08:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251598#M35497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-05-12T08:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251599#M35498</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have used tBLOBDownload component to get BLOB (PDF File) from oracle database. It's downloaded the file but unable to open, getting below error;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Adobe Reader could not open … because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn’t correctly decoded).&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Any help is appreciated.&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;Thanks,&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;LRS&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 Aug 2019 13:50:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251599#M35498</guid>
      <dc:creator>Lr_Sudha</dc:creator>
      <dc:date>2019-08-30T13:50:29Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Create file from a blob input (oracle db)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251600#M35499</link>
      <description>&lt;P&gt;hi sudheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;were you able to find the solution for this problem, i have the same issue, can you send me screenshot or solution for it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 23:54:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Create-file-from-a-blob-input-oracle-db/m-p/2251600#M35499</guid>
      <dc:creator>trivikram</dc:creator>
      <dc:date>2021-03-08T23:54:37Z</dc:date>
    </item>
  </channel>
</rss>

