<?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: Convert String to Decimal and Error Handling in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301143#M73288</link>
    <description>&lt;P&gt;When I changed my o_TWEET_ID Datatype to Integer and gave this condition&lt;/P&gt; 
&lt;P&gt;row1.TWEET_ID==null || row1.TWEET_ID==""?0:Integer.parseInt((row1.TWEET_ID))&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my PASS Table of tmap the Port is Integer with Length 30. In Database the Column is NUMBER(30)&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Apr 2018 15:46:19 GMT</pubDate>
    <dc:creator>abhi90</dc:creator>
    <dc:date>2018-04-27T15:46:19Z</dc:date>
    <item>
      <title>Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301139#M73284</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt; 
&lt;P&gt;I want to convert Data of One of My Column which is holding Value like&amp;nbsp;7.13084E17. E is nothing but 0's. Value is like 7.13084000000000000.Now I have to Convert it to Decimal. In Output Table Column is in Number(30). Now I am converting it to Decimal Something Like This in variable Port o_row1.column.&lt;/P&gt; 
&lt;P&gt;Double.parseDouble(row1.column)==0?0&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;ouble.parseDouble(&lt;SPAN&gt;row1.&lt;/SPAN&gt;&lt;SPAN&gt;column&lt;/SPAN&gt;). Now using this Same in tmap Pass and Fail Table as&amp;nbsp;Var.&lt;SPAN&gt;o_row1.column&lt;/SPAN&gt;&amp;gt;=-1.00(Pass) and&amp;nbsp;&lt;SPAN&gt;Var.&lt;/SPAN&gt;&lt;SPAN&gt;o_row1.column&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;-1.00. But Compilation error is coming saying can't convert from Double to BigDecimal. My Pass Table of tmap&amp;nbsp;o_row1.column is BigDecimal&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKj7AAG"&gt;@TRF&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LKmJAAW"&gt;@manodwhb&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLseAAG"&gt;@vboppudi&lt;/A&gt;,&amp;nbsp;&lt;A href="https://community.qlik.com/s/profile/null"&gt;@TRF&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:21:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301139#M73284</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T14:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301140#M73285</link>
      <description>&lt;P&gt;Now changing to BIGDECIMAL in the Variable Port Part getting error in the Validation Part&lt;/P&gt;
&lt;P&gt;new BigDecimal(row1.column)=Variable Port for Validation(Big Decimal)&lt;/P&gt;
&lt;P&gt;new BigDecimal(&lt;SPAN&gt;row1.&lt;/SPAN&gt;&lt;SPAN&gt;column&lt;/SPAN&gt;)==0?0:new BigDecimal(&lt;SPAN&gt;row1.&lt;/SPAN&gt;&lt;SPAN&gt;column&lt;/SPAN&gt;)=Output Port to Pass Table of tmap(Big Decimal)&lt;/P&gt;
&lt;P&gt;In the expression Giving Area of Pass and Fail Table tmap&lt;/P&gt;
&lt;P&gt;giving like this&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Variable Port for Validation(Big Decimal)&amp;gt;=-1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Variable Port for Validation(Big Decimal)&amp;lt;=-1&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But getting error as saying Incompatible operand types BigDecimal and int in&amp;nbsp;&amp;nbsp;Output Port to Pass Table of tmap.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:35:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301140#M73285</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T14:35:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301141#M73286</link>
      <description>&lt;P&gt;You need to show us your tMap with your configuration. This is down to you not using a BigDecimal class. Now we need to know if you are getting the values as Strings with the scientific notation or numbers. We also need to know whether you are trying to use boolean logic with your pass and fail values (should you be using a boolean type or this). Take a look here&amp;nbsp;&lt;A href="https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something that is certainly wrong (and you've not yet realised) is this.....&lt;/P&gt;
&lt;PRE&gt;Var.o_row1.column&amp;gt;=-1.00(Pass) and Var.o_row1.column&amp;lt;=-1.00&lt;/PRE&gt;
&lt;P&gt;&amp;gt;= -1 and &amp;lt;= -1 will be true for -1. You do not want that.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:37:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301141#M73286</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-27T14:37:50Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301142#M73287</link>
      <description>&lt;P&gt;I have attached the settings.Fail setting is&amp;nbsp;Var.v_TWEET_ID_CONVERSION&amp;lt;=-1&amp;nbsp;&lt;/P&gt;&lt;P&gt;pass condition is&amp;nbsp;&lt;SPAN&gt;Var.v_TWEET_ID_CONVERSION&amp;gt;=-1&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Ls7t"&gt;o_TWEET_ID.JPG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lsph"&gt;o_TWEET_ID_SETTINGS.JPG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lspm"&gt;PASS_CONDITION.JPG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009Lspw"&gt;tmap_pass.JPG&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LsjC"&gt;v_tweet_id_conversion.JPG&lt;/A&gt;</description>
      <pubDate>Fri, 27 Apr 2018 14:48:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301142#M73287</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T14:48:43Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301143#M73288</link>
      <description>&lt;P&gt;When I changed my o_TWEET_ID Datatype to Integer and gave this condition&lt;/P&gt; 
&lt;P&gt;row1.TWEET_ID==null || row1.TWEET_ID==""?0:Integer.parseInt((row1.TWEET_ID))&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In my PASS Table of tmap the Port is Integer with Length 30. In Database the Column is NUMBER(30)&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301143#M73288</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T15:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301144#M73289</link>
      <description>&lt;P&gt;OK, you need to simplify this and show us an example of something simple that fails. There is too much for me to look at and to try and work out.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;By the way, your logic ....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Fail setting is Var.v_TWEET_ID_CONVERSION&amp;lt;=-1 
pass condition is Var.v_TWEET_ID_CONVERSION&amp;gt;=-1 &lt;/PRE&gt;
&lt;P&gt;...is still broken. if Var.v_TWEET_ID_CONVERSION is -1 it will meet BOTH of those conditions. Just remove the = from one of them.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:54:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301144#M73289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-04-27T15:54:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301145#M73290</link>
      <description>&lt;P&gt;Hi Abhi,&lt;/P&gt;&lt;P&gt;Please provide some sample input records and expected output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 15:55:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301145#M73290</guid>
      <dc:creator>vboppudi</dc:creator>
      <dc:date>2018-04-27T15:55:29Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301146#M73291</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLseAAG"&gt;@vboppudi&lt;/A&gt;,&lt;/P&gt; 
&lt;P&gt;Please find it&lt;/P&gt; 
&lt;P&gt;6.84136E+17&lt;/P&gt; 
&lt;P&gt;6.917E+17&lt;/P&gt; 
&lt;P&gt;Like this. Basically Source is String is String and in target Datatype is NUMBER(30). I want to convert it to Number as well as want to handle Error if comes which I am doing using a Variable Port.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 16:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301146#M73291</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T16:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301147#M73292</link>
      <description>&lt;P&gt;What is the error criteria? is your source is excel?&lt;/P&gt;&lt;P&gt;6.84136E+17 is it valid ? if valid what is the output you are expecting?&lt;/P&gt;&lt;P&gt;6.917E+17&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;is it valid ? if valid what is the output you are expecting?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please give some sample data for invalid.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 16:12:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301147#M73292</guid>
      <dc:creator>vboppudi</dc:creator>
      <dc:date>2018-04-27T16:12:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301148#M73293</link>
      <description>&lt;P&gt;Yess Both are Valid.Coming from .csv and .txt. In Output Table Datatype is NUMBER(30).&lt;/P&gt; 
&lt;P&gt;InValid Record is -1.If any Value comes -1 or less than -1 then it will go ERROR Table.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;6.84136E+17 output Port will be like&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if row1.TWEET_ID==null?0:row1.TWEET_ID&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLseAAG"&gt;@vboppudi&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 16:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301148#M73293</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T16:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301149#M73294</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLseAAG"&gt;@vboppudi&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Let me know if any details required. I am also trying&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 16:31:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301149#M73294</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T16:31:45Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301150#M73295</link>
      <description>&lt;P&gt;Hi Abhi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Are you looking for this?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BigDecimal.PNG" style="width: 827px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwtl.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/133506iDE904E26F69265F3/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwtl.png" alt="0683p000009Lwtl.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 16:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301150#M73295</guid>
      <dc:creator>vboppudi</dc:creator>
      <dc:date>2018-04-27T16:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301151#M73296</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLseAAG"&gt;@vboppudi&lt;/A&gt;,&lt;/P&gt;
&lt;P&gt;Yes in Database ValidData should go with E. But how did u managed to do this?&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 17:47:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301151#M73296</guid>
      <dc:creator>abhi90</dc:creator>
      <dc:date>2018-04-27T17:47:33Z</dc:date>
    </item>
    <item>
      <title>Re: Convert String to Decimal and Error Handling</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301152#M73297</link>
      <description>&lt;P&gt;Use the following settings in tMap.&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="BigDecimal1.PNG" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lwry.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/147893i662F80385D8E2841/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lwry.png" alt="0683p000009Lwry.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Fri, 27 Apr 2018 17:52:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Convert-String-to-Decimal-and-Error-Handling/m-p/2301152#M73297</guid>
      <dc:creator>vboppudi</dc:creator>
      <dc:date>2018-04-27T17:52:40Z</dc:date>
    </item>
  </channel>
</rss>

