<?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: How to use &amp;quot;Stream&amp;quot; in tS3Put component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295488#M68262</link>
    <description>&lt;P&gt;Hey Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you ever figure out how to configure this? I'm looking to do the same sort of thing and I haven't been able to get stream to work with the tS3Put component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help or guidance would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;</description>
    <pubDate>Tue, 18 Feb 2020 16:08:33 GMT</pubDate>
    <dc:creator>ryanmcnulty</dc:creator>
    <dc:date>2020-02-18T16:08:33Z</dc:date>
    <item>
      <title>How to use "Stream" in tS3Put component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295485#M68259</link>
      <description>&lt;P&gt;Hello everyone,&lt;BR /&gt;&lt;BR /&gt;I have a question regarding to the tS3Put component of Talend.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;The use-case here is that there is sensetive data in one MySQL database (and another MS SQL Server database) and the tables have to be copied to the S3 Bucket. I do not want to store locally any tables as files but stream it directly to the AWS S3 Bucket (probably in an anonymized way). As I understand the documentation of the tS3Put it should be possible to "upload data onto S3 from cache memory via the streaming mode" (&lt;A href="https://help.talend.com/reader/O2KQy1hnDchwiVtvmf7fuw/~cG6gm8R5iovpRtn1_ka3Q" target="_self" rel="nofollow noopener noreferrer"&gt;Talend Documentation&lt;/A&gt;) which is supported since Talend Studio 7.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How do I achive that?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;More information about a simple job is provided by the screenshots.&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="01tS3Put" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4T0.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155086iD77371223E6CDDFA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4T0.png" alt="0683p000009M4T0.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;01tS3Put&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="02tS3Put" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4T5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/140852i880085C17CEC9C54/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4T5.png" alt="0683p000009M4T5.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;02tS3Put&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="03tS3Put" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4IN.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142089i77E5F1AC67D6528E/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4IN.png" alt="0683p000009M4IN.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;03tS3Put&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="04tS3Put" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4TA.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/137762iC26A10942B40F97C/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4TA.png" alt="0683p000009M4TA.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;04tS3Put&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="05tS3Put" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M4TF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153522i370A88C942C6B1AF/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M4TF.png" alt="0683p000009M4TF.png" /&gt;&lt;/span&gt;&lt;SPAN class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;05tS3Put&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 11:12:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295485#M68259</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-07T11:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "Stream" in tS3Put component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295486#M68260</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LPWtAAO"&gt;@tomtailor&lt;/A&gt;&amp;nbsp;,check the below link to use stream option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.talend.com/reader/og0CEvPpYA_lek9vzkTKig/FqKUw_PbNWEpKBOGkBcAeQ" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/og0CEvPpYA_lek9vzkTKig/FqKUw_PbNWEpKBOGkBcAeQ&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 May 2019 14:25:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295486#M68260</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2019-05-07T14:25:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "Stream" in tS3Put component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295487#M68261</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;&amp;nbsp;but I already saw this site and does not help me. Its more about how to use the tS3Put component with "Stream" from a CSV-file (tFileOutputDelimited) in memory.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How can I do this?&lt;/P&gt;</description>
      <pubDate>Wed, 08 May 2019 08:04:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295487#M68261</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-05-08T08:04:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "Stream" in tS3Put component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295488#M68262</link>
      <description>&lt;P&gt;Hey Tom,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Did you ever figure out how to configure this? I'm looking to do the same sort of thing and I haven't been able to get stream to work with the tS3Put component.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help or guidance would be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Ryan&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 16:08:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295488#M68262</guid>
      <dc:creator>ryanmcnulty</dc:creator>
      <dc:date>2020-02-18T16:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to use "Stream" in tS3Put component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295489#M68263</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a simple use-case you can refer to this sample job here:&lt;/P&gt;&lt;P&gt;https://github.com/Talend/tuj/tree/master/tuj/java/Amazon/S3/TDI40201_tS3Put_SmallStream&lt;/P&gt;&lt;P&gt;It basically uses:&lt;/P&gt;&lt;P&gt;java.io.FileInputStream stream = new java.io.FileInputStream(context.data_output_dir + "/" +&amp;nbsp;jobName + "/out.csv");&lt;/P&gt;&lt;P&gt;globalMap.put("stream", stream);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And inside S3Put:&lt;/P&gt;&lt;P&gt;(java.io.FileInputStream)globalMap.get("stream")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I also did a quick test with multiple threads.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000Z2xM0AAJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/129716i0EE5F295F4644C28/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000Z2xM0AAJ.png" alt="0695b00000Z2xM0AAJ.png" /&gt;&lt;/span&gt;tSleep is not needed but it proves that we can flush and close the OutputStream before we start to consume it. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This relies on java PipedInput / PipedOutputStream.&lt;/P&gt;&lt;P&gt;We create an Output and an Input stream and link them together. &lt;/P&gt;&lt;P&gt;(Inspiration came from https://stackoverflow.com/questions/5778658/how-to-convert-outputstream-to-inputstream )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a tJava we prepare these streams:&lt;/P&gt;&lt;P&gt;java.io.PipedInputStream in = new java.io.PipedInputStream();&lt;/P&gt;&lt;P&gt;final java.io.PipedOutputStream out = new java.io.PipedOutputStream(in);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;globalMap.put("inputStream", in);&lt;/P&gt;&lt;P&gt;globalMap.put("outputStream",out);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once this is done we can create our parallel threads via tParallellize.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FileOutputDelimited will use a stream and write to:&lt;/P&gt;&lt;P&gt;((java.io.PipedOutputStream)globalMap.get("outputStream"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Once it is done with writing we need to flush the stream (tJava):&lt;/P&gt;&lt;P&gt;java.io.PipedOutputStream outPipe = ((java.io.PipedOutputStream)globalMap.get("outputStream"));&lt;/P&gt;&lt;P&gt;outPipe.flush();&lt;/P&gt;&lt;P&gt;outPipe.close();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Meanwhile in the tS3Put we use:&lt;/P&gt;&lt;P&gt;((java.io.PipedInputStream)globalMap.get("inputStream"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 23 Nov 2022 07:54:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-quot-Stream-quot-in-tS3Put-component/m-p/2295489#M68263</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-23T07:54:20Z</dc:date>
    </item>
  </channel>
</rss>

