<?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: Need Inputs-while inserting file from s3 to oracle in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221970#M15758</link>
    <description>&lt;P&gt;Hi Nikhil,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have given hardcoded value and it ran fine but for Context.Mapping File it was giving issue.&lt;/P&gt; 
&lt;P&gt;but Now issue has been resolved.&lt;/P&gt; 
&lt;P&gt;I modified your command like this :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"STG_"+context.MAPPING_FILE.replaceAll("786","").replaceAll(".csv","")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and it ran successfully.&lt;/P&gt; 
&lt;P&gt;Thanks for your 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;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Mohit&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 06:37:06 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-12-11T06:37:06Z</dc:date>
    <item>
      <title>Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221966#M15754</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt; 
&lt;P&gt;At the very last moment i am stuck with an unexpected error.&lt;/P&gt; 
&lt;P&gt;I have like 100 of files.10-20 have files names like abc786.csv,bcd786.csv,efg786.csv etc...&lt;/P&gt; 
&lt;P&gt;786 the code of the files which is there after name of every file.&lt;/P&gt; 
&lt;P&gt;now,I have another set of files with the same name list12312786.csv&lt;/P&gt; 
&lt;P&gt;list5678786.csv,&lt;/P&gt; 
&lt;P&gt;list987645786.csv etc..&lt;/P&gt; 
&lt;P&gt;If you notice the list files ,you will get 786.csv as suffix here as well.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So now,i have to enter all files with the change of name: STG_abc,&lt;/P&gt; 
&lt;P&gt;STG_bcd,&lt;/P&gt; 
&lt;P&gt;STG_list12312,&lt;/P&gt; 
&lt;P&gt;STG_5678 etc...removing 786.csv and adding STG_ at prefix.&lt;/P&gt; 
&lt;P&gt;I used an expression in my tOracleoutput component in table name place:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"STG_"+StringHandling.EREPLACE("&amp;lt;FileName&amp;gt;","786.csv","")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;which will add STG_ as prefix and remove&amp;nbsp;"&lt;SPAN&gt;786.csv"&lt;/SPAN&gt; from suffix.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It was working fine while i was testing for 2-3 file.But Today when i run my job for entire file set.It did not work for "List files"&lt;/P&gt; 
&lt;P&gt;It is giving me the name &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M9p6.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134116iFBD5D7F21624A744/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M9p6.png" alt="0683p000009M9p6.png" /&gt;&lt;/span&gt;TG_L&lt;SPAN&gt;ist5678.csv, (removing 786 but not removing csv)&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;As far as i know the expression&amp;nbsp; ("STG_"+StringHandling.EREPLACE(context.MAPPING_FILE,"786.csv","") ) should work fine but now i got stuck in this.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Could you please help me in resolving the issue.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Mohit&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 12:56:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221966#M15754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-10T12:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221967#M15755</link>
      <description>&lt;P&gt;Hi Mohit,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;If I understood your query correctly, you want totrim the last 6 characters ie&amp;nbsp;&lt;SPAN&gt;"786.csv".&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Why don't you using a&amp;nbsp;replaceall as below.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"STG_"+row1.input.replaceAll("786.csv","") &lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; Please see the output below for sample record.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 985px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1QI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142028i67D6DD71DD7FF9B1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1QI.png" alt="0683p000009M1QI.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="image.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1QS.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135621i6FA07EC890581E35/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1QS.png" alt="0683p000009M1QS.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Another item I would say to check is whether you are picking the file extension also to the context variable when you are reading the file. That could be another reason why .csv is still present. Or you might be adding .csv later in your flow.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Warm Regards,&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Nikhil Thampi&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 13:38:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221967#M15755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-10T13:38:30Z</dc:date>
    </item>
    <item>
      <title>Re: Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221968#M15756</link>
      <description>&lt;P&gt;Hi Nikhil,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Unfortunately,it did not work.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;System.out.println("STG_"+context.MAPPING_FILE.replaceAll("786.csv",""));&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It is not removing .csv.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am not using rowgenerator.I am just taking one file and try to remove 786.csv.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It is working for hardcoded value but it is not working when i pass the file name as Context.FileName&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;regards,&lt;/P&gt; 
&lt;P&gt;Mohit&lt;/P&gt;</description>
      <pubDate>Mon, 10 Dec 2018 13:52:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221968#M15756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-10T13:52:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221969#M15757</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;It is interesting. Could you please print the value of&amp;nbsp;&lt;SPAN&gt;context.MAPPING_FILE and also the below statement side by side.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;System.out.println("STG_"+context.MAPPING_FILE.replaceAll("786.csv",""))&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; Lets see the output. Meanwhile I will check whether the full stop is&amp;nbsp;doing any special character conversion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Warm Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Nikhil Thampi&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 02:38:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221969#M15757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T02:38:14Z</dc:date>
    </item>
    <item>
      <title>Re: Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221970#M15758</link>
      <description>&lt;P&gt;Hi Nikhil,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have given hardcoded value and it ran fine but for Context.Mapping File it was giving issue.&lt;/P&gt; 
&lt;P&gt;but Now issue has been resolved.&lt;/P&gt; 
&lt;P&gt;I modified your command like this :&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;"STG_"+context.MAPPING_FILE.replaceAll("786","").replaceAll(".csv","")&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;and it ran successfully.&lt;/P&gt; 
&lt;P&gt;Thanks for your 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;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt; 
&lt;P&gt;Mohit&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 06:37:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221970#M15758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T06:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Need Inputs-while inserting file from s3 to oracle</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221971#M15759</link>
      <description>&lt;P&gt;Good work Mohit.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please mark your last post as answer to the query and close it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Nikhil Thampi&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 06:49:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Need-Inputs-while-inserting-file-from-s3-to-oracle/m-p/2221971#M15759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-12-11T06:49:34Z</dc:date>
    </item>
  </channel>
</rss>

