Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Source
-------
Product price
This is column is not mandatory and it have null values also in source data and it's reading the data as String.
Var
----
I have created with var Int datatype.
(int)(Double.parseDouble(row4.Product_price)*10000)
Output table - Set datatype as Double
-------------
Double.parseDouble(String.valueOf(Var.var2))/10000
So in Schemacompilance I have selected Nullable checkbox for this column.
After run the job since the source file as Null value am getting the below error,
java.lang.NumberFormatException: empty String
Even I have tried with logics but the same error am getting,
Am trim the value even it is null and check the length of the column. Some time if you have any blank spaces it will workout the null condition check.
Please correct me if anything wrong here.
((StringHandling.TRIM(row4.Unit_Selling_Price).length()<=0)?null:(int)(Double.parseDouble(row4.Unit_Selling_Price)*10000))