<?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 pass TalendDate in tJava component? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371715#M134625</link>
    <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is working inside the Talend studio, but when I am trying to run this job from commandline I am unable to override the value of the URL variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need to do anything else?  All the other context variables' values I am able to change from the command line, only the variables which I am passing through tJava component are unable to override.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know any possible solution for this? &lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheetal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Oct 2021 21:24:13 GMT</pubDate>
    <dc:creator>SJeshwani1618330394</dc:creator>
    <dc:date>2021-10-20T21:24:13Z</dc:date>
    <item>
      <title>How to pass TalendDate in tJava component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371712#M134622</link>
      <description>&lt;P&gt;I have a scenario in which I need to pass TalendDate.getDate into the URL in tHttpRequest component. I am able to get the result by using the below-mentioned URL but I want to get the URL using a variable.  However, as we cannot pass TalendDate in the context parameter, what is the workaround to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the URL that I am using in tHttpRequest component:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;https://services5.arcgis.com/sjP4Ugu5s0dZWLjd/arcgis/rest/services/Bands_Public/FeatureServer/0/query?where=STARTDATE%20%3E='"+ TalendDate.addDate( TalendDate.getDate("YYYYMMDD"), "yyyyMMdd", -3, "MM" )+"'AND%20STARTDATE%20%3C='"+ TalendDate.addDate( TalendDate.getDate("YYYYMMDD"), "yyyyMMdd", -1, "dd" )+"'&amp;amp;returnGeometry=true&amp;amp;resultType=standard&amp;amp;outFields=*&amp;amp;outSR=4326&amp;amp;f=json&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to pass a value for STARTDATE in this URL.  As I cannot pass TalendDate.getDate in the context parameter, what is the other way to do this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;At the end I want to pass the whole URL as a variable so that I can change the value when I am running this job from Commandline.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheetal&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 22:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371712#M134622</guid>
      <dc:creator>SJeshwani1618330394</dc:creator>
      <dc:date>2021-10-19T22:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass TalendDate in tJava component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371713#M134623</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;Set URL as a context variable and initialize the value on a tJava before it is used on tHttpRequet, for debugging, print the value on the console to check if the value is set correctly, eg:&lt;/P&gt;&lt;P&gt;tJava&lt;/P&gt;&lt;P&gt;|onsubjobok&lt;/P&gt;&lt;P&gt;tHttpRequest---&amp;gt;tLogRow&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;on tJava:&lt;/P&gt;&lt;P&gt;context.URL="&lt;A href="https://services5.arcgis.com/sjP4Ugu5s0dZWLjd/arcgis/rest/services/Bands_Public/FeatureServer/0/query?where=STARTDATE%20%3E=" alt="https://services5.arcgis.com/sjP4Ugu5s0dZWLjd/arcgis/rest/services/Bands_Public/FeatureServer/0/query?where=STARTDATE%20%3E=" target="_blank"&gt;https://services5.arcgis.com/sjP4Ugu5s0dZWLjd/arcgis/rest/services/Bands_Public/FeatureServer/0/query?where=STARTDATE%20%3E=&lt;/A&gt;'"+ TalendDate.addDate( TalendDate.getDate("YYYYMMDD"), "yyyyMMdd", -3, "MM" )+"'AND%20STARTDATE%20%3C='"+ TalendDate.addDate( TalendDate.getDate("YYYYMMDD"), "yyyyMMdd", -1, "dd" )+"'&amp;amp;returnGeometry=true&amp;amp;resultType=standard&amp;amp;outFields=*&amp;amp;outSR=4326&amp;amp;f=json";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System.out.println(context.URL);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&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>Wed, 20 Oct 2021 07:12:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371713#M134623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-10-20T07:12:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass TalendDate in tJava component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371714#M134624</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's working as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheetal&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 09:26:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371714#M134624</guid>
      <dc:creator>SJeshwani1618330394</dc:creator>
      <dc:date>2021-10-20T09:26:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to pass TalendDate in tJava component?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371715#M134625</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It is working inside the Talend studio, but when I am trying to run this job from commandline I am unable to override the value of the URL variable.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do I need to do anything else?  All the other context variables' values I am able to change from the command line, only the variables which I am passing through tJava component are unable to override.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you know any possible solution for this? &lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Sheetal&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Oct 2021 21:24:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-pass-TalendDate-in-tJava-component/m-p/2371715#M134625</guid>
      <dc:creator>SJeshwani1618330394</dc:creator>
      <dc:date>2021-10-20T21:24:13Z</dc:date>
    </item>
  </channel>
</rss>

