<?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: Dynamically Change the URI on the tHttpRequest Component in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311333#M82385</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMGdAAO" target="_self"&gt;jswalton85&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Can you please share your configuration for thttprequest .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I am having trouble setting up the connection . This is what i used -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;URI -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;"&lt;A href="https://data.mixpanel.com/api/2.0/export/?from_date=2018-09-10&amp;amp;to_date=2018-09-10&amp;quot;&amp;nbsp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://data.mixpanel.com/api/2.0/export/?from_date=2018-09-10&amp;amp;to_date=2018-09-10"&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Method - POST&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;checked Need authentication and provided user - **************&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;getting error as -&amp;nbsp;&lt;/SPAN&gt;411 Length Required&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have also tried&amp;nbsp;&lt;SPAN&gt;Content-Length:0 in header but ran into error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please share your configuration for thttprequest.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 30 Oct 2018 23:18:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2018-10-30T23:18:59Z</dc:date>
    <item>
      <title>Dynamically Change the URI on the tHttpRequest Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311330#M82382</link>
      <description>&lt;P&gt;Hey guys, this is my first post and I am new to ETL and Talend. &amp;nbsp;I've created a new job that makes a .txt file from Mixpanel's API, cleans it up and then inserts the data into our DataWarehouse. &amp;nbsp;This job is working flawlessly, however, it is a manual process that I now need to automate. &amp;nbsp;Each day I have to go and update the URI on my tHttpRequest Component with yesterday's date to then retrieve the latest full day of data. &amp;nbsp;The URI looks like this:&amp;nbsp;"&lt;A href="https://data.mixpanel.com/api/2.0/export/?from_date=2017-08-21&amp;amp;to_date=2017-08-21" target="_blank" rel="nofollow noopener noreferrer"&gt;https://data.mixpanel.com/api/2.0/export/?from_date=2017-08-21&amp;amp;to_date=2017-08-21&lt;/A&gt;" (and yes the dates are inclusive). &amp;nbsp;Now, I've looked at Context Variables and other ways to attempt this but none of it is making sense to me. &amp;nbsp;Is there a way that I can have the from_date and to_date update with the previous day every day automatically? &amp;nbsp;If so, the steps to accomplish this would be incredibly helpful. &amp;nbsp;I've attached a screenshot of the job if it helps any of you visual people out there. &amp;nbsp;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 20:44:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311330#M82382</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-22T20:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change the URI on the tHttpRequest Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311331#M82383</link>
      <description>You can achieve this 2 ways
&lt;BR /&gt;1. Using global variables
&lt;BR /&gt;2. Using context variables
&lt;BR /&gt;
&lt;BR /&gt;Whichever way you go, the logic will remain the same.
&lt;BR /&gt;
&lt;BR /&gt;With global varables, you update the required value (your date value) into a variable that you define within the job.
&lt;BR /&gt;
&lt;BR /&gt;With context variables, the variable needs to be declared before hand in the 'context' tab of your job. Then this context variable's value needs to be updated in the job before your main flow starts.
&lt;BR /&gt;
&lt;BR /&gt;Now, to update this variable, you can use a tJava component. You will need to write a bit of code to find the current date, decrement it by a day and then format it to the way you need it. This formatted value needs to be assigned to the variable that you created using either of the above 2 ways.</description>
      <pubDate>Tue, 22 Aug 2017 21:13:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311331#M82383</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-22T21:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change the URI on the tHttpRequest Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311332#M82384</link>
      <description>&lt;P&gt;Thanks for your input, this put me on the path that led to a resolution. &amp;nbsp;Here is what I did:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt; 
&lt;OL&gt; 
 &lt;LI&gt;Created a Global Variable with Key: "YesterdaysDate" | Value:&amp;nbsp;TalendDate.formatDate("yyyy-MM-dd", TalendDate.addDate(TalendDate.getCurrentDate(),-1,"dd"))&lt;/LI&gt; 
 &lt;LI&gt;Trigger OnSubjobOk to my tHttpRequest Component&lt;/LI&gt; 
 &lt;LI&gt;Set URI to the following:&amp;nbsp;"&lt;A href="https://data.mixpanel.com/api/2.0/export/?from_date=" target="_blank" rel="nofollow noopener noreferrer"&gt;https://data.mixpanel.com/api/2.0/export/?from_date=&lt;/A&gt;" + globalMap.get("YesterdaysDate") + "&amp;amp;to_date=" + globalMap.get("YesterdaysDate")&lt;/LI&gt; 
&lt;/OL&gt; 
&lt;P&gt;This helped me iterate through a date value in a tHttpRequest Component's URI perfectly. &amp;nbsp;Thanks again!&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsBn"&gt;MixpanelJob.PNG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsHB"&gt;MixpanelJobGlobalVariable.PNG&lt;/A&gt;</description>
      <pubDate>Wed, 23 Aug 2017 21:18:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311332#M82384</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-23T21:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically Change the URI on the tHttpRequest Component</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311333#M82385</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LMGdAAO" target="_self"&gt;jswalton85&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Can you please share your configuration for thttprequest .&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;I am having trouble setting up the connection . This is what i used -&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;URI -&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&amp;nbsp;"&lt;A href="https://data.mixpanel.com/api/2.0/export/?from_date=2018-09-10&amp;amp;to_date=2018-09-10&amp;quot;&amp;nbsp;" target="_blank" rel="nofollow noopener noreferrer"&gt;https://data.mixpanel.com/api/2.0/export/?from_date=2018-09-10&amp;amp;to_date=2018-09-10"&amp;nbsp;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;Method - POST&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;checked Need authentication and provided user - **************&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;getting error as -&amp;nbsp;&lt;/SPAN&gt;411 Length Required&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have also tried&amp;nbsp;&lt;SPAN&gt;Content-Length:0 in header but ran into error.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Can you please share your configuration for thttprequest.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks&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;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Oct 2018 23:18:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Dynamically-Change-the-URI-on-the-tHttpRequest-Component/m-p/2311333#M82385</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-30T23:18:59Z</dc:date>
    </item>
  </channel>
</rss>

