<?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: Type conversion with global variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222886#M16308</link>
    <description>hi chesofai&lt;BR /&gt;did you try with tConvertType component !?&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
    <pubDate>Mon, 09 Jul 2012 16:58:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-07-09T16:58:31Z</dc:date>
    <item>
      <title>Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222885#M16307</link>
      <description>Hi all,
&lt;BR /&gt;I am trying to get a value resulted from a SQL query in global variable, but i have the error below:
&lt;BR /&gt;Exception in component tMysqlInput_1
&lt;BR /&gt;java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
&lt;BR /&gt;Below the components i used:
&lt;BR /&gt;- tmysqlSP: executing stored procedure to load a specific table 
&lt;BR /&gt;- tmysqlinput (errotab): getting the number of rows in tthe table using a query with count(*) and storing this value in a global variable(cpt).
&lt;BR /&gt;- tmsgbox: displaying a specific message depending the IF link condition
&lt;BR /&gt;It seems that by definition Talend considers a global variable as a String, I tried the (Integer) cast but it gave me the error above.
&lt;BR /&gt;
&lt;BR /&gt;Best Regards</description>
      <pubDate>Mon, 09 Jul 2012 11:25:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222885#M16307</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T11:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222886#M16308</link>
      <description>hi chesofai&lt;BR /&gt;did you try with tConvertType component !?&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
      <pubDate>Mon, 09 Jul 2012 16:58:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222886#M16308</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T16:58:31Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222887#M16309</link>
      <description>Hi Kzone,&lt;BR /&gt;No i didn't try it.&lt;BR /&gt;I am trying to workaround my issue by comparing Strings. But my new issue is that in my TMysqlinput, i have a query&lt;BR /&gt;like "select count(*) as value from errortable" and i want to get the value returned by the query in a global variable, but i don't know if it can work?&lt;BR /&gt;I created i variable called "cpt" having the value "value" (from sql query!), but it seems that the Global variable is not getting the value!! &lt;BR /&gt;&lt;BR /&gt;How can i get the value of the SQL query ??&lt;BR /&gt;than you so much</description>
      <pubDate>Mon, 09 Jul 2012 17:59:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222887#M16309</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T17:59:19Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222888#M16310</link>
      <description>i've changed the request by :
&lt;BR /&gt;
&lt;PRE&gt;"SELECT count(*) as nbre&lt;BR /&gt;FROM `id24945`"&lt;/PRE&gt;
&lt;BR /&gt;and it work fine !
&lt;BR /&gt;
&lt;BR /&gt;retrieve the job (item) if you like on my 
&lt;A href="https://github.com/lraulier/forum_id24945" target="_blank" rel="nofollow noopener noreferrer"&gt;github&lt;/A&gt;
&lt;BR /&gt;regards
&lt;BR /&gt;laurent</description>
      <pubDate>Mon, 09 Jul 2012 22:04:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222888#M16310</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-09T22:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222889#M16311</link>
      <description>thank you Kzone,
&lt;BR /&gt;I am using TOS 5.0.2, tried to import your talend job and it failed.
&lt;BR /&gt;then downloaded TOS 5.1, tried to import again the talend job, but it didn't work. 
&lt;BR /&gt;could you help please? or send me the snashot for all the components especially , the tsetglobalvar and the IF !!
&lt;BR /&gt;
&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 10 Jul 2012 12:08:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222889#M16311</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-10T12:08:54Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222890#M16312</link>
      <description>sorry for delay,&lt;BR /&gt;I'll post screenshot tonight !&lt;BR /&gt;laurent</description>
      <pubDate>Wed, 11 Jul 2012 07:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222890#M16312</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-11T07:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222891#M16313</link>
      <description>I have import item in 5.1.1 and works fine 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;use the right button to do it ... 
&lt;BR /&gt;nerver mind see screenshoot 
&lt;BR /&gt;about if , what is the condition to display message? 
&lt;BR /&gt;laurent</description>
      <pubDate>Wed, 11 Jul 2012 21:03:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222891#M16313</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-11T21:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: Type conversion with global variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222892#M16314</link>
      <description>Hi Kzone,&lt;BR /&gt;Sorry for the delay in answering you, i was sick these days.&lt;BR /&gt;I did as you showed and it worked, using the IF condition comparing the strings: &lt;BR /&gt;&lt;BR /&gt;!((String)(globalMap.get("cpt"))).equals("0")   where "cpt" is the global variable resulting from the select query.&lt;BR /&gt;My aim was to compare the "cpt" to 0, but i am always having an error saying that cannot convert value, so i decied to &lt;BR /&gt;compare strings!&lt;BR /&gt;Do you have an idea to make the IF condition comparing the integer values instead of strings ???  ( i already tried to cast the condition using (Integer).&lt;BR /&gt;Regards</description>
      <pubDate>Tue, 17 Jul 2012 09:05:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Type-conversion-with-global-variable/m-p/2222892#M16314</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-07-17T09:05:28Z</dc:date>
    </item>
  </channel>
</rss>

