<?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: passing integer value to trest URL in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456347#M140685</link>
    <description>&lt;P&gt;What is the error ? The context is null or empty ? Runnid is in error because of int or varchar ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;First concerning the url try this :&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A href="https://domainname/api/integration_runs/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://domainname/api/integration_runs/&lt;/A&gt;" + (&lt;STRONG&gt;(Integer)globalMap.get(context.runid)) + "&lt;/STRONG&gt;&lt;SPAN&gt;/run"&lt;BR /&gt;The globalMap context must be initialize before you call the variable. I'm not sure your variable is initialized after the tjavarow, you should add a tflowtoiterate before, and from this component, tab "outline" get the runid you extracted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If not you can try to do it in two times, where the first time you put value into the context, and second time you call this context&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 26 May 2024 08:43:34 GMT</pubDate>
    <dc:creator>jeoste</dc:creator>
    <dc:date>2024-05-26T08:43:34Z</dc:date>
    <item>
      <title>passing integer value to trest URL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456151#M140684</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;I am facing an issue while passing integer value from tJava/tLog row componenet to tRest client component.&lt;/P&gt;
&lt;P&gt;I am successfully able to get the integer value which i want to pass to the trest URL like say 10000.&lt;/P&gt;
&lt;P&gt;my URL is like "&lt;A href="https://domainname/api/integration_runs/" target="_blank"&gt;https://domainname/api/integration_runs/&lt;/A&gt;&lt;STRONG&gt;((Integer)globalMap.get(context.runid))&lt;/STRONG&gt;/run"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i have to pass this value 10000 to the highlighted bold section. When i hard code in trest client it is working fine.&lt;/P&gt;
&lt;P&gt;my job is as below:&lt;/P&gt;
&lt;P&gt;trestcleint1--&amp;gt;xmlextract--&amp;gt;twarn--&amp;gt;tjava row ( here i am converting the value 10000 from string to INT)---&amp;gt;trestclient2.&lt;/P&gt;
&lt;P&gt;i also tried passing the int value as global variable &amp;amp; context but it is not workin. Can you please help.&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 14:05:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456151#M140684</guid>
      <dc:creator>sushantkapoor19</dc:creator>
      <dc:date>2024-05-24T14:05:55Z</dc:date>
    </item>
    <item>
      <title>Re: passing integer value to trest URL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456347#M140685</link>
      <description>&lt;P&gt;What is the error ? The context is null or empty ? Runnid is in error because of int or varchar ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;First concerning the url try this :&amp;nbsp;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A href="https://domainname/api/integration_runs/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://domainname/api/integration_runs/&lt;/A&gt;" + (&lt;STRONG&gt;(Integer)globalMap.get(context.runid)) + "&lt;/STRONG&gt;&lt;SPAN&gt;/run"&lt;BR /&gt;The globalMap context must be initialize before you call the variable. I'm not sure your variable is initialized after the tjavarow, you should add a tflowtoiterate before, and from this component, tab "outline" get the runid you extracted.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If not you can try to do it in two times, where the first time you put value into the context, and second time you call this context&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 08:43:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456347#M140685</guid>
      <dc:creator>jeoste</dc:creator>
      <dc:date>2024-05-26T08:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: passing integer value to trest URL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456534#M140695</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get the below error:&lt;/P&gt;
&lt;P&gt;Exception in component tRESTClient_3 (Coupa_API_PO_to_oneDWH_SK_Integration_run_PUT)&lt;BR /&gt;javax.ws.rs.WebApplicationException: HTTP 404 Not Found.&lt;/P&gt;
&lt;P&gt;The context that i have defined in Talend job is empty.I have defined it as Integer. Isnt that correct?because when i hard code this value in URL , it works fine in postman.&lt;/P&gt;
&lt;P&gt;Logic in tjava row is as below:&lt;/P&gt;
&lt;P&gt;Integer runid= Integer.valueOf(row10.runid);&lt;BR /&gt;row11.runid = runid;&lt;BR /&gt;&lt;STRONG&gt;context.runid=row11.runid;&lt;/STRONG&gt;&lt;BR /&gt;System.out.println(context.runid);&lt;BR /&gt;globalMap.put("runid",row11.runid);&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;so the context is initialized in tjava row only. Isnt this correct? where should i put tFlowtoIterate? before or after tJava row?i checked in debugger the value of runid is getting generated correctly and so i am passing the output from tJavarow --&amp;gt;tRestclient.&lt;/P&gt;
&lt;P&gt;Can you please let me know if any changes are needed. I still get the same error. i think it is because it is unable to read the value if runid.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 09:55:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456534#M140695</guid>
      <dc:creator>sushantkapoor19</dc:creator>
      <dc:date>2024-05-27T09:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: passing integer value to trest URL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456589#M140697</link>
      <description>&lt;P&gt;&lt;EM&gt;(&lt;STRONG&gt;(Integer)globalMap.get(context.runid))&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;=&amp;gt;The correct syntax of using global variable is: (Integer)globalMap.get("key"), context.runid is not a key in your case.&lt;/P&gt;
&lt;P&gt;Make sure context.runid has the correct value on tJavaRow before it is used.&lt;/P&gt;
&lt;P&gt;Change the URL to:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;A href="https://domainname/api/integration_runs/" target="_blank" rel="nofollow noopener noreferrer"&gt;https://domainname/api/integration_runs/&lt;/A&gt;&lt;SPAN&gt;" + &lt;/SPAN&gt;&lt;STRONG&gt;context.runid+ "&lt;/STRONG&gt;&lt;SPAN&gt;/run"&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 12:10:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456589#M140697</guid>
      <dc:creator>Shicong_Hong</dc:creator>
      <dc:date>2024-05-27T12:10:44Z</dc:date>
    </item>
    <item>
      <title>Re: passing integer value to trest URL</title>
      <link>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456606#M140698</link>
      <description>&lt;P&gt;ok. now its working correctly. Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Mon, 27 May 2024 13:24:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/passing-integer-value-to-trest-URL/m-p/2456606#M140698</guid>
      <dc:creator>sushantkapoor19</dc:creator>
      <dc:date>2024-05-27T13:24:00Z</dc:date>
    </item>
  </channel>
</rss>

