<?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: Postgres globalMap query help in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237883#M26173</link>
    <description>Yep, that helped me see the issue. It basically just showed me that in this case I didn't even have to use the global variable. Thanks.</description>
    <pubDate>Tue, 05 Nov 2019 20:58:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-11-05T20:58:14Z</dc:date>
    <item>
      <title>Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237871#M26161</link>
      <description>&lt;P&gt;I am trying to update two columns based on globalMap (which gets the jobs ID).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is my query that I have in query editor:&lt;/P&gt;
&lt;PRE&gt;UPDATE jobs
SET succ_flag = 'success',
	last_exec_complete = current_timestamp
WHERE job_id ='" + ((String)globalMap.get("myJob")) +"'&lt;/PRE&gt;
&lt;P&gt;But that gives me this error:&lt;/P&gt;
&lt;P&gt;ERROR: invalid input syntax for integer: "" + ((String)globalMap.get("myJob")) +""&lt;BR /&gt;Position: 94&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How am I supposed to add globalMap to my query?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 22:01:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237871#M26161</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T22:01:26Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237872#M26162</link>
      <description>The way the query is constructed is ok (except the end which should be "'") but the column job_id is a number. Change the global type to Integer or use a syntax like this one:
&lt;BR /&gt;WHERE job_id = to_number('" + ((String)globalMap.get("myJob")) + "')"
&lt;BR /&gt;
&lt;BR /&gt;(to_number or corresponding function for your database)</description>
      <pubDate>Mon, 04 Nov 2019 22:21:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237872#M26162</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-04T22:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237873#M26163</link>
      <description>&lt;P&gt;Thank you, that makes sense. However, when I tried the to_number option I still receive an error.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This time the error is:&lt;/P&gt; 
&lt;PRE&gt;Unterminated identifier started at position 147 in SQL UPDATE jobs
SET succ_flag = 'success',
	last_exec_complete = current_timestamp
WHERE job_id = to_number('" + ((String)globalMap.get("myJob")) + "')". Expected " char&lt;/PRE&gt; 
&lt;P&gt;Are you familiar with this error or is there a way I can find out where exactly is position 147?&lt;/P&gt;</description>
      <pubDate>Mon, 04 Nov 2019 22:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237873#M26163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-04T22:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237874#M26164</link>
      <description>Try from outside the Studio to find the correct syntax</description>
      <pubDate>Mon, 04 Nov 2019 22:38:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237874#M26164</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-04T22:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237875#M26165</link>
      <description>&lt;P&gt;I can get it to work from outside easily. Just not inside with ((String)globalMap.get("myJob"))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I might have to think another way around it.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 16:36:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237875#M26165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T16:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237876#M26166</link>
      <description>&lt;P&gt;Your query must be entered as a string in the Query field.&lt;/P&gt; 
&lt;P&gt;So it must be included between "" like this:&lt;/P&gt; 
&lt;PRE&gt;"UPDATE jobs
SET succ_flag = 'success',
	last_exec_complete = current_timestamp
WHERE job_id = to_number('" + ((String)globalMap.get("myJob")) + "')"&lt;/PRE&gt; 
&lt;P&gt;Don't forget the " at the beginning.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 16:56:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237876#M26166</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-05T16:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237877#M26167</link>
      <description>&lt;P&gt;I have all that, which is why I am thinking now I am messing up somewhere else or need to try a different approach.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This is what I tried&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="query.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M7Ge.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147925i59D44DB881965863/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M7Ge.png" alt="0683p000009M7Ge.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I even tried to copy and paste what you put into the bottom query box (so it doesn't have the \'s) but still no luck.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;It gives me this error:&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="error.png" style="width: 855px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M83j.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/155663i166A26C7AA0070A0/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M83j.png" alt="0683p000009M83j.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I tried other options such as:&lt;/P&gt; 
&lt;PRE&gt;UPDATE jobs
SET succ_flag = 'success',
	last_exec_complete = current_timestamp
WHERE job_id = to_number('" + ((String)globalMap.get("myJob")) + "', '99')&lt;/PRE&gt; 
&lt;P&gt;and to use CAST or ::integer but no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 17:29:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237877#M26167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T17:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237878#M26168</link>
      <description>What if you try this for the where clause?&lt;BR /&gt;"... WHERE job_id = " + ((String)globalMap.get("myJob"))</description>
      <pubDate>Tue, 05 Nov 2019 17:47:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237878#M26168</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-05T17:47:42Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237879#M26169</link>
      <description>&lt;P&gt;That seems to be more in the right direction but still no luck.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It just tells me:&lt;/P&gt;
&lt;PRE&gt;ERROR: syntax error at or near "17"
  Position: 99&lt;/PRE&gt;
&lt;P&gt;I believe it means job id 17 since there is no other 17 in the query but that shouldn't cause any issues since it is almost identical to other jobs in this test scenario.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 18:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237879#M26169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T18:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237880#M26170</link>
      <description>What's the datatype for the job_id column un thé database?</description>
      <pubDate>Tue, 05 Nov 2019 18:52:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237880#M26170</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-05T18:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237881#M26171</link>
      <description>&lt;P&gt;int4&lt;/P&gt;</description>
      <pubDate>Tue, 05 Nov 2019 19:15:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237881#M26171</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T19:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237882#M26172</link>
      <description>Strange...&lt;BR /&gt;I suggest you to construct the query into a global variable and to display it before the tDBRow component</description>
      <pubDate>Tue, 05 Nov 2019 19:30:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237882#M26172</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-05T19:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237883#M26173</link>
      <description>Yep, that helped me see the issue. It basically just showed me that in this case I didn't even have to use the global variable. Thanks.</description>
      <pubDate>Tue, 05 Nov 2019 20:58:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237883#M26173</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-11-05T20:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Postgres globalMap query help</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237884#M26174</link>
      <description>Great!&lt;BR /&gt;Thanks to mark your case as solved.</description>
      <pubDate>Tue, 05 Nov 2019 22:41:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Postgres-globalMap-query-help/m-p/2237884#M26174</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2019-11-05T22:41:24Z</dc:date>
    </item>
  </channel>
</rss>

