<?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: [resolved] Joblet and dynamic SQL queries using tFlowToIterate in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314464#M85226</link>
    <description>I resolve my issue with the following solution :
&lt;BR /&gt;Assign the value of the tFlowToIterate in a new variable via the tJava :
&lt;BR /&gt;
&lt;PRE&gt;System.out.print("Valeur : " + ((String)globalMap.get("input.value")) + "\n");&lt;BR /&gt;globalMap.put("test", ((String)globalMap.get("input.value")));&lt;/PRE&gt;
&lt;BR /&gt;Using this new variable in the tMysqlInput (and other tMysqlXxxx) :
&lt;BR /&gt;
&lt;PRE&gt;"SELECT '" + ((String)globalMap.get("test")) + "'"&lt;/PRE&gt;
&lt;BR /&gt;It gave me a working Joblet : 
&lt;BR /&gt;
&lt;PRE&gt;Valeur : value 1&lt;BR /&gt;.-------.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value &amp;nbsp;|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value 1|&lt;BR /&gt;'-------'&lt;BR /&gt;Valeur : value 2&lt;BR /&gt;.-------.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value &amp;nbsp;|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value 2|&lt;BR /&gt;'-------'&lt;/PRE&gt;
&lt;BR /&gt;It a little more complicated, we have to think to assign all the field, but it works so.</description>
    <pubDate>Mon, 18 Aug 2014 13:51:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-08-18T13:51:15Z</dc:date>
    <item>
      <title>[resolved] Joblet and dynamic SQL queries using tFlowToIterate</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314460#M85222</link>
      <description>Hello,
&lt;BR /&gt;I'm trying to create a Joblet who generate some dynamics queries using a tFlowToIterate, that I try to execute in some DB components.
&lt;BR /&gt;The following code runs without any problem in a tJava, it returns "Table : pts_dispos"
&lt;BR /&gt;
&lt;PRE&gt;System.out.print("Table : " + ((String)globalMap.get("enter_flux.table")) + "\n");&lt;/PRE&gt;
&lt;BR /&gt;But if try to use this same variable in a tMysqlRow, it returns null :
&lt;BR /&gt;
&lt;PRE&gt;UPDATE cadrage SET libelle = '" + ((String)globalMap.get("enter_flux.table")) + "'&lt;/PRE&gt;
&lt;BR /&gt;Did someone knows why I get a different result from the same variable in the same emplacement in my process, but in a different component ? The entire process ran without any problems before I refactor it in JobLet.</description>
      <pubDate>Mon, 18 Aug 2014 11:02:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314460#M85222</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T11:02:20Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Joblet and dynamic SQL queries using tFlowToIterate</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314461#M85223</link>
      <description>In MySQL, try following query 
&lt;BR /&gt; 
&lt;FONT face="consolas, monaco, 'bitstream vera sans mono', 'courier new', courier, monospace"&gt;"UPDATE cadrage SET libelle = "+((String)globalMap.get("enter_flux.table"))&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT face="consolas, monaco, bitstream vera sans mono, courier new, courier, monospace"&gt;Thanks&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT face="consolas, monaco, bitstream vera sans mono, courier new, courier, monospace"&gt;vaibhav&lt;/FONT&gt;</description>
      <pubDate>Mon, 18 Aug 2014 11:16:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314461#M85223</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T11:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Joblet and dynamic SQL queries using tFlowToIterate</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314462#M85224</link>
      <description>It returns the following error : "Column 'libelle' cannot be null". So "((String)globalMap.get("enter_flux.table"))" return the null value instead of "pts_dispos", which is still return in the tJava.</description>
      <pubDate>Mon, 18 Aug 2014 13:05:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314462#M85224</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T13:05:45Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Joblet and dynamic SQL queries using tFlowToIterate</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314463#M85225</link>
      <description>I recreate an all new Joblet (see the screenshot) with the following code : 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;B&gt;tJava&lt;/B&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;System.out.print("Valeur : " + ((String)globalMap.get("input.value")) + "\n");&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;B&gt;base_xmpie&lt;/B&gt; 
&lt;BR /&gt; 
&lt;PRE&gt;"SELECT '" + ((String)globalMap.get("input.value")) + "'"&lt;/PRE&gt; 
&lt;BR /&gt;I use this Joblet in a simple job with only a tFixeFlowInput, and this that I had in return : 
&lt;BR /&gt; 
&lt;PRE&gt;Démarrage du job Z05_Test_Joblets a 14:16 18/08/2014.&lt;BR /&gt; connecting to socket on port 3426&lt;BR /&gt; connected&lt;BR /&gt;******* 2014-08-18 : 14:16:44 - Z05_Test_Joblets *******&lt;BR /&gt;Valeur : value 1&lt;BR /&gt;.-----.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=---=|&lt;BR /&gt;|value|&lt;BR /&gt;|=---=|&lt;BR /&gt;|null |&lt;BR /&gt;'-----'&lt;BR /&gt;Valeur : value 2&lt;BR /&gt;.-----.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=---=|&lt;BR /&gt;|value|&lt;BR /&gt;|=---=|&lt;BR /&gt;|null |&lt;BR /&gt;'-----'&lt;BR /&gt;279 milliseconds&lt;BR /&gt; disconnected&lt;BR /&gt;Job Z05_Test_Joblets terminé à 14:16 18/08/2014.&lt;BR /&gt;&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;So it seems to me that tMysql_xxx and tJava doesn't accept the same use in a Joblet. 
&lt;BR /&gt;I use TIS 5.3.1.r104014 on Windows 7. 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MEDi.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152442iB05FC070096DB731/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MEDi.jpg" alt="0683p000009MEDi.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 18 Aug 2014 13:23:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314463#M85225</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Joblet and dynamic SQL queries using tFlowToIterate</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314464#M85226</link>
      <description>I resolve my issue with the following solution :
&lt;BR /&gt;Assign the value of the tFlowToIterate in a new variable via the tJava :
&lt;BR /&gt;
&lt;PRE&gt;System.out.print("Valeur : " + ((String)globalMap.get("input.value")) + "\n");&lt;BR /&gt;globalMap.put("test", ((String)globalMap.get("input.value")));&lt;/PRE&gt;
&lt;BR /&gt;Using this new variable in the tMysqlInput (and other tMysqlXxxx) :
&lt;BR /&gt;
&lt;PRE&gt;"SELECT '" + ((String)globalMap.get("test")) + "'"&lt;/PRE&gt;
&lt;BR /&gt;It gave me a working Joblet : 
&lt;BR /&gt;
&lt;PRE&gt;Valeur : value 1&lt;BR /&gt;.-------.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value &amp;nbsp;|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value 1|&lt;BR /&gt;'-------'&lt;BR /&gt;Valeur : value 2&lt;BR /&gt;.-------.&lt;BR /&gt;|Select value|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value &amp;nbsp;|&lt;BR /&gt;|=-----=|&lt;BR /&gt;|value 2|&lt;BR /&gt;'-------'&lt;/PRE&gt;
&lt;BR /&gt;It a little more complicated, we have to think to assign all the field, but it works so.</description>
      <pubDate>Mon, 18 Aug 2014 13:51:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Joblet-and-dynamic-SQL-queries-using-tFlowToIterate/m-p/2314464#M85226</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-08-18T13:51:15Z</dc:date>
    </item>
  </channel>
</rss>

