<?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 add a variable to pass date parameters in tRESTClient component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215642#M11984</link>
    <description>Hi 
&lt;BR /&gt;It was a wrong job design, tRestClient don't accept an iterate link as input flow. The solution is to store the value returned by tRestClient_1 to a context variable or global variable for use later; In the next subjob, tRestClient use the context variable or global variable as the parameter value. 
&lt;BR /&gt;tRestClient_1--Response--&amp;gt;tXMLMap---main--tJavaRow 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tRestClient_2 
&lt;BR /&gt;on tJavaRow, store the value to a context variable, for example: 
&lt;BR /&gt;context.jobId=input_row.jobId; 
&lt;BR /&gt;Shong</description>
    <pubDate>Fri, 07 Feb 2014 01:17:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-07T01:17:04Z</dc:date>
    <item>
      <title>How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215637#M11979</link>
      <description>Hi,
&lt;BR /&gt;I am using Talend open studio for data integration 5.4 for my data integration needs. I am testing to get data from api service using tRESTclient component. For webservice parameters, I can pass static dates. But if I want to automate this job on daily basis, I want to use a variable which will get the today's date and can be passed as parameter to webservice. I am trying to figure out how can I use a variable to pass date parameters to tRESTClient component. Can anyone please help me?
&lt;BR /&gt;
&lt;BR /&gt;Thanks,
&lt;BR /&gt;Gowri</description>
      <pubDate>Tue, 04 Feb 2014 00:35:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215637#M11979</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-04T00:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215638#M11980</link>
      <description>Hi 
&lt;BR /&gt;You can specify the parameter in the Query parameters table, see my screenshot, I use the built-in function TalendDate.getCurrentDate() to the current date as the value of mydate parameter. 
&lt;BR /&gt;Shong 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MCnl.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139019iD9B1B73A702DFDC8/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MCnl.png" alt="0683p000009MCnl.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Tue, 04 Feb 2014 10:25:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215638#M11980</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-04T10:25:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215639#M11981</link>
      <description>Thanks Shong for the reply. This really works. I also a need to pass output of one the tRESTClient as a query parameter to next tRESTClient. How do you do that? 
&lt;BR /&gt;In my example, I make a call to get job id. Then I need to pass that job id to second tRESTClient as a query parameter. How can I replicate this one? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Gowri</description>
      <pubDate>Wed, 05 Feb 2014 00:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215639#M11981</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-05T00:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215640#M11982</link>
      <description>Hi 
&lt;BR /&gt;tRestClient returs a document, link the response to a tXMLMap to extract the value you want from the document, and pass it to another tRestClient, the job design looks like: 
&lt;BR /&gt;tRestClient_1--Response--&amp;gt;tXMLMap---main(row1)---tFlowToIterate---tRestClient_2 
&lt;BR /&gt;on tRestClient_2, set the query parameter with the value such as (String)globalMap.get("row1.jobId") 
&lt;BR /&gt;Shong</description>
      <pubDate>Wed, 05 Feb 2014 08:28:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215640#M11982</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-05T08:28:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215641#M11983</link>
      <description>Hi Shong,
&lt;BR /&gt;I tried to create a workflow like you mentioned. I am not able to connect tFlowtoIterate - Iterate to tRestClient_2. I don't see tFlowToIterate - Main to connect to tRestClient.</description>
      <pubDate>Thu, 06 Feb 2014 19:53:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215641#M11983</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-06T19:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215642#M11984</link>
      <description>Hi 
&lt;BR /&gt;It was a wrong job design, tRestClient don't accept an iterate link as input flow. The solution is to store the value returned by tRestClient_1 to a context variable or global variable for use later; In the next subjob, tRestClient use the context variable or global variable as the parameter value. 
&lt;BR /&gt;tRestClient_1--Response--&amp;gt;tXMLMap---main--tJavaRow 
&lt;BR /&gt; | 
&lt;BR /&gt;onsubjobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tRestClient_2 
&lt;BR /&gt;on tJavaRow, store the value to a context variable, for example: 
&lt;BR /&gt;context.jobId=input_row.jobId; 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 07 Feb 2014 01:17:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215642#M11984</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-07T01:17:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to add a variable to pass date parameters in tRESTClient component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215643#M11985</link>
      <description>Hi, 
&lt;BR /&gt;I have a PHP script which does HTTP post request to get data from external API service . I am trying to migrate that script to Talend using tRestClient to do a http post request with content type as JSON. Script has following callobject 
&lt;BR /&gt;$callobj = array( 
&lt;BR /&gt; 'method' =&amp;gt; $method_name, 
&lt;BR /&gt; 'params' =&amp;gt; array( 'partner_id' =&amp;gt; $partner_id, 
&lt;BR /&gt; 'tms' =&amp;gt; $tms, 
&lt;BR /&gt; 'sig' =&amp;gt; $sig, 
&lt;BR /&gt; 'date' =&amp;gt; 'yyyy-mm-dd', // Only one date allowed per api call 
&lt;BR /&gt; 'attribution' =&amp;gt; 'conversion', // 'conversion' or 'click', determines whether to filter date by view/click or by conversion 
&lt;BR /&gt; 'timezone' =&amp;gt; 'UTC', 
&lt;BR /&gt; 'fields' =&amp;gt; array( 'site_id', 'type', 'name', 'conversion_datetime', 'action_type','client_user_id'), 
&lt;BR /&gt; ) 
&lt;BR /&gt;); 
&lt;BR /&gt;In tRestClient component I have set up following based on above code snippet 
&lt;BR /&gt;I have given the url, HTTP Method - POST, Content Type -&amp;gt; JSON, Accept_type -&amp;gt; JSON 
&lt;BR /&gt;In query parameters 
&lt;BR /&gt;"method" - "method_name" 
&lt;BR /&gt;"params" -"partner_id=X$partner_id,tms=$tms,sig=$sig,date=yyyy-mm-dd,attribution=click,timezone=PST,fields=site_id,metrics=fbspend" 
&lt;BR /&gt;But it is not working. Is this kind of POST request supported in Talend? Is there way to pass this parameters? Can you please help me? 
&lt;BR /&gt;Thanks, 
&lt;BR /&gt;Gowri</description>
      <pubDate>Wed, 12 Mar 2014 06:05:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-add-a-variable-to-pass-date-parameters-in-tRESTClient/m-p/2215643#M11985</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-03-12T06:05:15Z</dc:date>
    </item>
  </channel>
</rss>

