<?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: tHttpRequest custom parameter in file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269242#M47556</link>
    <description>One way , you keep your parameter file as template. In it assign from and to as variable like
&lt;BR /&gt;
&lt;BR /&gt;&amp;lt;period from=stringtoreplace1 to=stringtoreplace2&amp;gt;
&lt;BR /&gt;
&lt;BR /&gt;Everyday create a parameter file by replacing above variable using tjavarow/treplace etc.
&lt;BR /&gt;Use newly created file in http component.
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://help.talend.com/reader/Y6cetClmMZDfpUVtVCFdow/kRnjfFJFBt1Un1P9oOzWyw" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/Y6cetClmMZDfpUVtVCFdow/kRnjfFJFBt1Un1P9oOzWyw&lt;/A&gt;
&lt;BR /&gt;
&lt;BR /&gt;</description>
    <pubDate>Sat, 16 Feb 2019 17:54:10 GMT</pubDate>
    <dc:creator>akumar2301</dc:creator>
    <dc:date>2019-02-16T17:54:10Z</dc:date>
    <item>
      <title>tHttpRequest custom parameter in file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269241#M47555</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have an API with parameter.&lt;/P&gt; 
&lt;P&gt;URI: "&lt;A href="https://mysite.com/payment/query" target="_blank" rel="nofollow noopener noreferrer"&gt;https://mysite.com/payment/query&lt;/A&gt;?"&lt;/P&gt; 
&lt;P&gt;There is parameter "load" which contain request. Currently i am loading the parameter value from txt file as below screenshot. But my problem is i have "&amp;lt;Period from='2019-02-15 00:00:00' to='2019-02-15 23:59:59'/&amp;gt;" in my request file, and this will everyday.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;my param file contain:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;load=&amp;lt;?xml version='1.0' encoding='UTF-8'?&amp;gt;&amp;lt;Request version='1.0'&amp;gt;&amp;lt;Header&amp;gt;&amp;lt;Security sender='xxxxxxxxxxxxxxxxxxxx' type='PSP'/&amp;gt;&amp;lt;/Header&amp;gt;&amp;lt;Query mode='CONNECTOR_TEST' level='CHANNEL' entity='xxxxxxxxxxxxxxx' type='STANDARD'&amp;gt;&amp;lt;User login='xxxxxxxx' pwd='xxxxxxx' /&amp;gt;&amp;lt;Period from='2019-02-04 00:00:00' to='2019-02-04 23:59:59'/&amp;gt;&amp;lt;Types&amp;gt;&amp;lt;Type code='DB'/&amp;gt;&amp;lt;Type code='RF'/&amp;gt;&amp;lt;/Types&amp;gt;&amp;lt;ProcessingResult&amp;gt;ACK&amp;lt;/ProcessingResult&amp;gt;&amp;lt;/Query&amp;gt;&amp;lt;/Request&amp;gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.jpg" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3Al.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/130154iADFB77B347F0376F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3Al.jpg" alt="0683p000009M3Al.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Please advise.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Feb 2019 20:07:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269241#M47555</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-15T20:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: tHttpRequest custom parameter in file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269242#M47556</link>
      <description>One way , you keep your parameter file as template. In it assign from and to as variable like
&lt;BR /&gt;
&lt;BR /&gt;&amp;lt;period from=stringtoreplace1 to=stringtoreplace2&amp;gt;
&lt;BR /&gt;
&lt;BR /&gt;Everyday create a parameter file by replacing above variable using tjavarow/treplace etc.
&lt;BR /&gt;Use newly created file in http component.
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://help.talend.com/reader/Y6cetClmMZDfpUVtVCFdow/kRnjfFJFBt1Un1P9oOzWyw" target="_blank" rel="nofollow noopener noreferrer"&gt;https://help.talend.com/reader/Y6cetClmMZDfpUVtVCFdow/kRnjfFJFBt1Un1P9oOzWyw&lt;/A&gt;
&lt;BR /&gt;
&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Feb 2019 17:54:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269242#M47556</guid>
      <dc:creator>akumar2301</dc:creator>
      <dc:date>2019-02-16T17:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: tHttpRequest custom parameter in file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269243#M47557</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;Thank you, i added tJava, added code and finally the whole request is formatted with date, and then write to a file in specific location. So now i will read same file with tHttpRequest.&lt;/P&gt; 
&lt;P&gt;The issue is file write take a small amount of time, and then it finishes, tHttpRequest give error&amp;nbsp;C:\Users\myuser\Desktop\param.txt (The system cannot find the file specified).&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;using below code to write a file in tJava&lt;/P&gt; 
&lt;PRE&gt;mainText= String.format(mainText,frmDate,toDate); 

File newTextFile = new File("C:/Users/myuser/Desktop/param.txt");

FileWriter fw = new FileWriter(newTextFile);
fw.write(mainText);
fw.close();&lt;/PRE&gt; 
&lt;P&gt;I even tried the Thread.sleep but not helpful, also tried Trigger for OnSubJobOK.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any advise?&lt;/P&gt;</description>
      <pubDate>Sun, 17 Feb 2019 20:44:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269243#M47557</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-17T20:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: tHttpRequest custom parameter in file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269244#M47558</link>
      <description>&lt;P&gt;Finally it is like below. in tJava i am making a file with date. and then passing that to tHttpRequest.&lt;/P&gt; 
&lt;P&gt;Thank You&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LP7CAAW"&gt;@uganesh&lt;/A&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot_1.jpg" style="width: 394px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M3AN.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/153952iA9740B7B46E22685/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M3AN.jpg" alt="0683p000009M3AN.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Feb 2019 11:25:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tHttpRequest-custom-parameter-in-file/m-p/2269244#M47558</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-02-18T11:25:22Z</dc:date>
    </item>
  </channel>
</rss>

