<?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: tREST http body problems using global variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350830#M117613</link>
    <description>&lt;P&gt;I think I solved it, but need to confirm with you.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in a Key - Value for the global variable I had this in Value: &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;"row5.scroll_id"&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - i.e. surrounded by double quotes &lt;STRONG&gt;"".&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;Because it is &lt;STRONG&gt;expression&lt;/STRONG&gt; I had to &lt;U&gt;remove&lt;/U&gt; those double quotes like so: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;row5.scroll_id&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It seems to be working now, but please confirm this for me so others may also benefit from my Learner mistakes ! 8^) LOL&lt;/P&gt; 
&lt;P&gt;I was passing scroll_id string value of&amp;nbsp;&lt;STRONG&gt;"row5.scroll_id"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; to the http body of tREST, it seems.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 Jul 2017 08:50:52 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-07-26T08:50:52Z</dc:date>
    <item>
      <title>tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350828#M117611</link>
      <description>&lt;P&gt;Hello everyone&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have looked at previous questions on this topic but I suspect I may have a different issue with a global variable I am trying to pass into tREST http Body.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am definitely doing something wrong in my Talend DI job.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The&amp;nbsp;following fails:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;http body in tREST calling ElasticSearch set like so:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;((String)globalMap.get("myscrollid"))&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Error from ElasticSearch results:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;{"error":"ElasticsearchIllegalArgumentException[Failed to decode scrollId];&lt;/P&gt; 
&lt;P&gt;nested: IOException[Bad Base64 input character decimal 46 in array position 4]; ","status":400}~400&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I use the hard-coded value of the ScrollID in http Body and surrounded by double-quotes like so:&lt;/P&gt; 
&lt;P&gt;http Body:&lt;/P&gt; 
&lt;P&gt;&lt;EM&gt;"c2NhbjsxMDsxODQ1OTM5ODE5OndCZktsWUo1VHYta3RvdWZiUmMzWFE7MTg0NTkzOTgyMDp3QmZLbFlKNVR2LWt0b3VmYlJjM1hROzE4NDYyNzg2ODk6bkE2T0ZVVWtRcFdNMktLT0tmaTRUBBISHMjc4NjkwOm5BNk9GVVVrUXBXTTJLS09LZmk4M1E7MTg0NDQ0NjcyNzo4cE9xcjB0S1NfQ195M0VmdWpSMlFnOzE4NDQ0NDY3Mjg6OHBPcXIwdEtTX0NfeTNFZnVqUjJRZzsxODQ0MTA3MzM4OkZIdnkyaXEzUXMtSS1RR0htRTlnRlE7MTg0NDMwNjE1MTpTelRndzJmN1J2Q0JTWlRNdUpRaVNBOzE4NDU2MDkyOTI6Q0xzTllsVl9TdmF5em9RVW1lOWhfdzsxODQ0ODkzMDg5OjJTTkpRNUd0U1MyWlg3ekNQWmFMd0E7MTt0b3RhbF9oaXRzOjEzNzIwNTs="&lt;/EM&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Then it works.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So I know the software on client and server is OK and it must be my error in Talend DI job.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am doing something wrong passing the value stored in global variable to http body.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have verified the value of global variable by using tLog and writing the value to csv file, so I am sure the value itself is OK, since I used it as hard-coded value to prove it works.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Somehow the way I extract that value programmatically into http body upsets ElasticSearch !&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks for any tips and clues!&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 09:29:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350828#M117611</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T09:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350829#M117612</link>
      <description>&lt;P&gt;I suspect that this may be relatively straight forward, but we will need more info to give you an answer. Can you post a couple of screenshots showing your job, where you set the globalMap variable and you tRest config please?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 08:46:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350829#M117612</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T08:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350830#M117613</link>
      <description>&lt;P&gt;I think I solved it, but need to confirm with you.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;in a Key - Value for the global variable I had this in Value: &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;"row5.scroll_id"&lt;/STRONG&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; - i.e. surrounded by double quotes &lt;STRONG&gt;"".&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;Because it is &lt;STRONG&gt;expression&lt;/STRONG&gt; I had to &lt;U&gt;remove&lt;/U&gt; those double quotes like so: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;STRONG&gt;row5.scroll_id&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It seems to be working now, but please confirm this for me so others may also benefit from my Learner mistakes ! 8^) LOL&lt;/P&gt; 
&lt;P&gt;I was passing scroll_id string value of&amp;nbsp;&lt;STRONG&gt;"row5.scroll_id"&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp; to the http body of tREST, it seems.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 08:50:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350830#M117613</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T08:50:52Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350831#M117614</link>
      <description>&lt;P&gt;I'm not sure what you have done here. Are you still referring to a globalMap variable or are you just referring to the row value? Can you take a screenshot please?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:01:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350831#M117614</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T09:01:27Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350832#M117615</link>
      <description>in designer in Key-Value
&lt;BR /&gt;I have "gbl_varname" in Key (in double-quotes) and "row5.scrollid" in Value in double-quotes.
&lt;BR /&gt;I should have had rows5.scrollid in Value *without* double-quotes
&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:09:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350832#M117615</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T09:09:42Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350833#M117616</link>
      <description>&lt;P&gt;I think I see. So you went from this....&lt;/P&gt;
&lt;PRE&gt;globalMap.put("gbl_varname", "row5.scrollid") &lt;/PRE&gt;
&lt;P&gt;....to this....&lt;/P&gt;
&lt;PRE&gt;globalMap.put("gbl_varname", row5.scrollid) &lt;/PRE&gt;
&lt;P&gt;If so, that explains everything. Putting quotes around text makes it a String Literal in Java.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jul 2017 09:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350833#M117616</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-26T09:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350834#M117617</link>
      <description>&lt;P&gt;yes, exactly, and I did not see this until I examined the generated Java code&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;which means that even if you do not write any Java code to be able to work with Talend you still need to be able to read and understand Java code.&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>Thu, 27 Jul 2017 00:27:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350834#M117617</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-27T00:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: tREST http body problems using global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350835#M117618</link>
      <description>&lt;P&gt;Yes, you do need Java.....which is no bad thing in my opinion. While some people wishing to sell development products like to be able to claim&amp;nbsp;"my grandmother can use this", it really helps nobody when you end up with&amp;nbsp;a "development team" who do not know how many bits are in a byte &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jul 2017 00:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tREST-http-body-problems-using-global-variable/m-p/2350835#M117618</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-07-27T00:39:42Z</dc:date>
    </item>
  </channel>
</rss>

