<?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: Iterate through globalMap in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294285#M67183</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Do you really need to handle this&amp;nbsp;&lt;SPAN&gt;restRequest global variable ?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I did test below:&lt;/P&gt; 
&lt;P&gt;1-My job looks like:&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="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lvum.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152285iBE6E5F2F9078E726/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lvum.png" alt="0683p000009Lvum.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;With:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw1x.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135363i8FA85DC0D9BEEFDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw1x.png" alt="0683p000009Lw1x.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my tJavaRow, I can get these two fields:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;System.out.println(globalMap.get("restRequest"));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println("********************H1******************************");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println(input_row.h1);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println("********************Q1******************************");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println(input_row.q1);&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2-I call this REST webservice from SOAPUI:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 628px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw9V.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147509i794CCE95E21F5286/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw9V.png" alt="0683p000009Lw9V.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;3-Then I get the values of these two parameters (As they are in the global variable):&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{URI_ABSOLUTE=http://localhost:8088/TEST, PATTERN=/, OPERATION=OUT, ALL_HEADER_PARAMS={accept-encoding=[gzip,deflate], connection=[keep-alive], Content-Length=[9], content-type=[application/x-www-form-urlencoded], h1=[header1], Host=[localhost:8088], User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]}, VERB=POST, MESSAGE_CONTEXT=org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext@1f3cbb32, URI_BASE=http://localhost:8088/TEST, CorrelationID=null, PARAMS={HEADER:h1:id_String=header1, FORM:q1:id_String=mydata}, URI=/, ALL_QUERY_PARAMS={}, URI_REQUEST=http://localhost:8088/TEST}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;********************H1******************************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;header1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;********************Q1******************************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;mydata&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Doesn't it meet your requirements ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt;</description>
    <pubDate>Fri, 11 Aug 2017 13:53:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-11T13:53:51Z</dc:date>
    <item>
      <title>Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294278#M67176</link>
      <description>&lt;P&gt;I am sing TalendESB --&amp;gt; tRestRequest.&amp;nbsp;I am able to see all the content of globalMap.get("restRequest").&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;{URI_ABSOLUTE=&lt;A href="http://localhost:8088/data/" target="_blank"&gt;http://localhost:8088/data/&lt;/A&gt;, PATTERN=/data/, OPERATION=b, ALL_HEADER_PARAMS={a=[123], Accept=[application/json, text/plain, */*], accept-encoding=[gzip, deflate, br], Accept-Language=[en-US,en;q=0.8], connection=[keep-alive], Content-Length=[9], content-type=[application/x-www-form-urlencoded], DNT=[1], h1=[header1], Host=[localhost:8088], User-Agent=[Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3071.115 Safari/537.36]}, VERB=POST, MESSAGE_CONTEXT=org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext@29b4f161, URI_BASE=&lt;A href="http://localhost:8088/" target="_blank"&gt;http://localhost:8088/&lt;/A&gt;, CorrelationID=null, PARAMS={HEADER:h1:id_String=header1, FORM:q1:id_String=mydata}, URI=data/, ALL_QUERY_PARAMS={}, URI_REQUEST=&lt;A href="http://localhost:8088/data/" target="_blank"&gt;http://localhost:8088/data/&lt;/A&gt;}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I specifically need to extract the PARAMS object...&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;PARAMS={HEADER:h1:id_String=header1, FORM:q1:id_String=mydata}&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;How can I capture the HEADERS and FORM data in tJavaRow (after tRestRequest)?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Thanks!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:25:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294278#M67176</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2024-11-16T09:25:18Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294279#M67177</link>
      <description>&lt;P&gt;EDIT: My reply was not relevant after re-looking at you question. I'll be back after trying something&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 15:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294279#M67177</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T15:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294280#M67178</link>
      <description>&lt;P&gt;OK, what I thought would work, does work. You will need a bit of Java experience for this, but with that you should be able to extrapolate from the code below which will print out&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;//The object with the key "restRequest" is a HashMap
java.util.Map&amp;lt;String, Object&amp;gt; myMap = ((java.util.Map&amp;lt;String, Object&amp;gt;)globalMap.get("restRequest"));

//Print out of what you are seeing already
System.out.println("MyMap = " +myMap.toString());

//Create an iterator over the keyset
java.util.Iterator&amp;lt;String&amp;gt; it = myMap.keySet().iterator();

//Iterate over the keyset and print out the keys
while(it.hasNext()){
	System.out.println(it.next());
}

//Retrieve the PARAMS HashMap
java.util.Map&amp;lt;String, Object&amp;gt; myParams = ((java.util.Map&amp;lt;String, Object&amp;gt;)myMap.get("PARAMS"));

//Create an Iterator for the PARAMS HashMap
java.util.Iterator&amp;lt;String&amp;gt; it2 = myParams.keySet().iterator();

//Iterate over the PARAMS HasMap
while(it2.hasNext()){
	System.out.println(it2.next());
}&lt;/PRE&gt;</description>
      <pubDate>Thu, 10 Aug 2017 16:20:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294280#M67178</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T16:20:21Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294281#M67179</link>
      <description>Wow, this is helpful (with the comments). I will try that out and reply back in a few. Thanks 
&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;</description>
      <pubDate>Thu, 10 Aug 2017 16:29:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294281#M67179</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2017-08-10T16:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294282#M67180</link>
      <description>Hi, I just tried this code, it looks promising. For some reason, at the PARAMS part, it is not printing any values..
&lt;BR /&gt;I see:
&lt;BR /&gt;HEADER:h1:id_String
&lt;BR /&gt;FORM:q1:id_String
&lt;BR /&gt;
&lt;BR /&gt;I am trying to play around with .values() and seeing if I can get the values out too.
&lt;BR /&gt;
&lt;BR /&gt;Thanks for the start!</description>
      <pubDate>Thu, 10 Aug 2017 16:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294282#M67180</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2017-08-10T16:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294283#M67181</link>
      <description>So, this worked for me:
&lt;BR /&gt;
&lt;BR /&gt;while(it2.hasNext()){
&lt;BR /&gt;
&lt;BR /&gt;String key = it2.next().toString();
&lt;BR /&gt;String value = myParams.get(key).toString();
&lt;BR /&gt;
&lt;BR /&gt;System.out.println(key + " " + value);
&lt;BR /&gt;
&lt;BR /&gt;}</description>
      <pubDate>Thu, 10 Aug 2017 16:57:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294283#M67181</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2017-08-10T16:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294284#M67182</link>
      <description>&lt;P&gt;Glad it worked ...or helped you to get to a working solution &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Aug 2017 17:09:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294284#M67182</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T17:09:24Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294285#M67183</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Do you really need to handle this&amp;nbsp;&lt;SPAN&gt;restRequest global variable ?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I did test below:&lt;/P&gt; 
&lt;P&gt;1-My job looks like:&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="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lvum.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152285iBE6E5F2F9078E726/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lvum.png" alt="0683p000009Lvum.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;With:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw1x.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/135363i8FA85DC0D9BEEFDA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw1x.png" alt="0683p000009Lw1x.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my tJavaRow, I can get these two fields:&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;System.out.println(globalMap.get("restRequest"));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println("********************H1******************************");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println(input_row.h1);&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println("********************Q1******************************");&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;System.out.println(input_row.q1);&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;2-I call this REST webservice from SOAPUI:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 628px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lw9V.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147509i794CCE95E21F5286/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lw9V.png" alt="0683p000009Lw9V.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;3-Then I get the values of these two parameters (As they are in the global variable):&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;{URI_ABSOLUTE=http://localhost:8088/TEST, PATTERN=/, OPERATION=OUT, ALL_HEADER_PARAMS={accept-encoding=[gzip,deflate], connection=[keep-alive], Content-Length=[9], content-type=[application/x-www-form-urlencoded], h1=[header1], Host=[localhost:8088], User-Agent=[Apache-HttpClient/4.1.1 (java 1.5)]}, VERB=POST, MESSAGE_CONTEXT=org.apache.cxf.jaxrs.impl.tl.ThreadLocalMessageContext@1f3cbb32, URI_BASE=http://localhost:8088/TEST, CorrelationID=null, PARAMS={HEADER:h1:id_String=header1, FORM:q1:id_String=mydata}, URI=/, ALL_QUERY_PARAMS={}, URI_REQUEST=http://localhost:8088/TEST}&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;********************H1******************************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;header1&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;********************Q1******************************&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;mydata&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Doesn't it meet your requirements ?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Eric&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 13:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294285#M67183</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-11T13:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Iterate through globalMap</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294286#M67184</link>
      <description>&lt;P&gt;I can use these; and I am doing so. But there are some places in my code where I simply need to ignore the calls and log them. I do not want to parse the headers and all. Hence, when I found this restRequest GlobalMap, it struck me as I can simply dump this info directly for now and parse it later as needed.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 11 Aug 2017 14:31:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Iterate-through-globalMap/m-p/2294286#M67184</guid>
      <dc:creator>root</dc:creator>
      <dc:date>2017-08-11T14:31:15Z</dc:date>
    </item>
  </channel>
</rss>

