<?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 If then else condition while compare Interger and String datatype in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320225#M90388</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While reading the source file the below 2 column appear as below data type in output table as well schema editor in tmap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.Department_id&amp;nbsp;(Integer)&lt;/P&gt;&lt;P&gt;row4.Department_name (String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is&lt;/P&gt;&lt;P&gt;if &lt;/P&gt;&lt;P&gt;Department_name &lt;/P&gt; is empty I should bring the &lt;P&gt;Department_id&amp;nbsp;&lt;/P&gt; value in &lt;P&gt;Department_name &lt;/P&gt;column. So I have written the below logic,&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.&lt;/P&gt;&lt;P&gt;Department_name&lt;/P&gt;.isEmpty()?row4.&lt;P&gt;Department_id&lt;/P&gt;:row4.&lt;P&gt;Department_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's causing the error cannot convert from Integer to String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the same logic works fine if the both column has String Datatype.I have some of the column were both are string.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Jan 2021 18:23:28 GMT</pubDate>
    <dc:creator>SMahadevan1608028474</dc:creator>
    <dc:date>2021-01-21T18:23:28Z</dc:date>
    <item>
      <title>If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320225#M90388</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;While reading the source file the below 2 column appear as below data type in output table as well schema editor in tmap.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.Department_id&amp;nbsp;(Integer)&lt;/P&gt;&lt;P&gt;row4.Department_name (String)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My requirement is&lt;/P&gt;&lt;P&gt;if &lt;/P&gt;&lt;P&gt;Department_name &lt;/P&gt; is empty I should bring the &lt;P&gt;Department_id&amp;nbsp;&lt;/P&gt; value in &lt;P&gt;Department_name &lt;/P&gt;column. So I have written the below logic,&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;row4.&lt;/P&gt;&lt;P&gt;Department_name&lt;/P&gt;.isEmpty()?row4.&lt;P&gt;Department_id&lt;/P&gt;:row4.&lt;P&gt;Department_name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's causing the error cannot convert from Integer to String.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the same logic works fine if the both column has String Datatype.I have some of the column were both are string.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Jan 2021 18:23:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320225#M90388</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-21T18:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320226#M90389</link>
      <description>&lt;P&gt;You need to parse row4.Department_id to String. String.valueOf(row4.Department_id)&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 01:47:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320226#M90389</guid>
      <dc:creator>CLi1594691515</dc:creator>
      <dc:date>2021-01-22T01:47:23Z</dc:date>
    </item>
    <item>
      <title>Re: If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320227#M90390</link>
      <description>&lt;P&gt;Thanks for your email on this,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried with the below way in output table for the dept_id column and change the datatype as String,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;String.valueOf(row4.Dept_id)&lt;/P&gt;&lt;P&gt;&amp;nbsp;**************&lt;/P&gt;&lt;P&gt;The same way I have tried with Var in tMap,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(string)String.valueOf(row4.Dept_id) - String datatype and point this into one new column in output table name it as (Dept_id)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But both case am facing the same issue. Is anything wrong am doing here ?&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jan 2021 10:52:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320227#M90390</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-22T10:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320228#M90391</link>
      <description>&lt;P&gt;Can some one help me on this if this my logic is correct ?&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 15:50:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320228#M90391</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-25T15:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320229#M90392</link>
      <description>&lt;P&gt;Your logic seems okay.&lt;/P&gt;&lt;P&gt;Can you screen cap your actual setting?&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;U&gt;Actual coding&lt;/U&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;Var&lt;/B&gt;: String.valueOf(row3.dept_id) &lt;/P&gt;&lt;P&gt;&lt;B&gt;Output&lt;/B&gt;: row3.dept_name.isEmpty() ? Var.dept_id_String : row3.dept_name&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 02:04:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320229#M90392</guid>
      <dc:creator>CLi1594691515</dc:creator>
      <dc:date>2021-01-26T02:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: If then else condition while compare Interger and String datatype</title>
      <link>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320230#M90393</link>
      <description>&lt;P&gt;It's working fine and got the result. Thanks for help.&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 10:53:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/If-then-else-condition-while-compare-Interger-and-String/m-p/2320230#M90393</guid>
      <dc:creator>SMahadevan1608028474</dc:creator>
      <dc:date>2021-01-26T10:53:15Z</dc:date>
    </item>
  </channel>
</rss>

