Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to to division (i.e)
(row1.oper_exp/row1.net_sales)*100
You just answered your own question in the same post
Keep in mind the nullpointerexception, which will be raised if one of your variables is null.
row1.OPER_EXP == null || row1.NET_SALES == null ? null : (row1.OPER_EXP /row1.NET_SALES )*100
Your columns are also defined in UPPERCASE and the formula lower case... Talend (java) is case sensitive
But still it is throwing error
look at java docu : https://docs.oracle.com/javase/7/docs/api/java/math/BigDecimal.html
Example:
// create 3 BigDecimal objects BigDecimal bg1, bg2, bg3; bg1 = new BigDecimal("16"); bg2 = new BigDecimal("3"); // divide bg1 with bg2 with 3 scale bg3 = bg1.divide(bg2, 3, RoundingMode.CEILING);
so:
row1.OPER_EXP.divide(row1.NET_SALES, 3, RoundingMode.CEILING)