<?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 [resolved] Change where clause in a lookup with tPostgresqlInput in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373481#M136199</link>
    <description>&lt;P&gt;Hello everyone.&lt;BR /&gt;&lt;BR /&gt;Talend&amp;nbsp;&amp;nbsp; = TOS 6.1.1&lt;BR /&gt;OS &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Mac Os El Capitan&lt;BR /&gt;&lt;BR /&gt;My job is &lt;BR /&gt;&lt;BR /&gt;tConnection --&amp;gt; tFileInputDelimited--&amp;gt; tMap (few lookups with tPostgesqlInput) --&amp;gt; tPostgresqlOutput --&amp;gt; tCommit&lt;BR /&gt;&lt;BR /&gt;In one of the lookup, i want to select data with a value from another lookup.&lt;BR /&gt;It works because i've debugged values and see the good values.&lt;BR /&gt;My problem is that i don't want to use all the value received but a part of it :&lt;BR /&gt;&lt;BR /&gt;SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring(my_column from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;&lt;BR /&gt;my_column is NOT the column in the schema but the key value received from the lookup Tmap.&lt;BR /&gt;So query will be :&lt;BR /&gt;&lt;BR /&gt;SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring('FRGF-2016-06-12345' from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;&lt;BR /&gt;I don't have found a solution to replace the my_column parameter with the value from the tMap.&lt;BR /&gt;Any idea ?&lt;BR /&gt;For the moment, the query retreive all the table's data but i just want for exemple the FRGF ones.&lt;BR /&gt;&lt;BR /&gt;In another ETL and with Oracle, i've just to write :1 to tell it to replace the parameter 1 with my value&lt;/P&gt;</description>
    <pubDate>Thu, 09 Jun 2016 13:32:38 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-06-09T13:32:38Z</dc:date>
    <item>
      <title>[resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373481#M136199</link>
      <description>&lt;P&gt;Hello everyone.&lt;BR /&gt;&lt;BR /&gt;Talend&amp;nbsp;&amp;nbsp; = TOS 6.1.1&lt;BR /&gt;OS &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = Mac Os El Capitan&lt;BR /&gt;&lt;BR /&gt;My job is &lt;BR /&gt;&lt;BR /&gt;tConnection --&amp;gt; tFileInputDelimited--&amp;gt; tMap (few lookups with tPostgesqlInput) --&amp;gt; tPostgresqlOutput --&amp;gt; tCommit&lt;BR /&gt;&lt;BR /&gt;In one of the lookup, i want to select data with a value from another lookup.&lt;BR /&gt;It works because i've debugged values and see the good values.&lt;BR /&gt;My problem is that i don't want to use all the value received but a part of it :&lt;BR /&gt;&lt;BR /&gt;SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring(my_column from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;&lt;BR /&gt;my_column is NOT the column in the schema but the key value received from the lookup Tmap.&lt;BR /&gt;So query will be :&lt;BR /&gt;&lt;BR /&gt;SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring('FRGF-2016-06-12345' from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;&lt;BR /&gt;I don't have found a solution to replace the my_column parameter with the value from the tMap.&lt;BR /&gt;Any idea ?&lt;BR /&gt;For the moment, the query retreive all the table's data but i just want for exemple the FRGF ones.&lt;BR /&gt;&lt;BR /&gt;In another ETL and with Oracle, i've just to write :1 to tell it to replace the parameter 1 with my value&lt;/P&gt;</description>
      <pubDate>Thu, 09 Jun 2016 13:32:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373481#M136199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-09T13:32:38Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373482#M136200</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;nobody to help me ?&lt;BR /&gt;I've tried the tSetGlobalVar and it doesn't work in the tPostgresqlInput. The value is good in the tMap but it fails in the tPostgresqlInput.&lt;BR /&gt;"SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE ((String)globalMap.get("PrefixOrg"))||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;Exception in thread "main" java.lang.Error: Unresolved compilation problems: &lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; The operator * is undefined for the argument type(s) java.lang.String, java.lang.String&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Syntax error on token "PrefixOrg", * expected</description>
      <pubDate>Mon, 13 Jun 2016 07:43:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373482#M136200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-13T07:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373483#M136201</link>
      <description>I've no error writing the query like this :&lt;BR /&gt;&lt;BR /&gt;"SELECT \n&amp;nbsp; ref_invoice FROM \""+&lt;BR /&gt;context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE '" + ((String)globalMap.get("PrefixOrg")) + "' ||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"&lt;BR /&gt;&lt;BR /&gt;But it retrieve nothing.</description>
      <pubDate>Mon, 13 Jun 2016 08:16:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373483#M136201</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-13T08:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373484#M136202</link>
      <description>Found it ! 
&lt;BR /&gt; 
&lt;BR /&gt;at the tMap for the lookup, choose "Reload at each row". 
&lt;BR /&gt;Then a globalMap expression appears. Put your value with a global map variable as : 
&lt;BR /&gt;=&amp;gt; for the expression, the column with the value 
&lt;BR /&gt;=&amp;gt; for the key globalmap, the name of the variable (here myKey for the exemple) 
&lt;BR /&gt;In the query, you can use it with ((String)globalMap.get("myKey")) and it works. 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks to myself. 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACJ.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133049iD780B7DE0116E4D1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACJ.png" alt="0683p000009MACJ.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 13 Jun 2016 12:53:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373484#M136202</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-06-13T12:53:36Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373485#M136203</link>
      <description>hai Carlos.Lopes&amp;nbsp;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;&amp;nbsp; I am facing syntax error&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana," helvetica=""&gt;((String)globalMap.get("myKey")) &amp;nbsp;whaile using tis syntax.Can you help me&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Fri, 05 Aug 2016 08:25:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373485#M136203</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-05T08:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Change where clause in a lookup with tPostgresqlInput</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373486#M136204</link>
      <description>Hi,
&lt;BR /&gt;
&lt;BR /&gt;can you give more details about your query please ?</description>
      <pubDate>Fri, 05 Aug 2016 12:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Change-where-clause-in-a-lookup-with-tPostgresqlInput/m-p/2373486#M136204</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-05T12:09:58Z</dc:date>
    </item>
  </channel>
</rss>

