Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
(String)row7.selling_price.equals(null))?0:row7.selling_price
(row7.selling_price.toString().equals(null))?0:row7.selling_price
(row7.selling_price == null)?0:row7.selling_price
((String.valueOf(row8.payment_date).equals("null"))
||
(String.valueOf(row8.payment_date).equals("NULL"))
||
(String.valueOf(row8.payment_date).isEmpty()))
?false
:true
row8.payment_date==null ? false:true
I know this may be not related to this but I working on 2 sheet of same excel file and trying to inserting one column each from both sheets to a table(single) by joining 2 sheets but I'm getting 0 rows on this inspite of having some data matches based on key.Later I found out that it is due to Talend trying to extract data from sheets as column1 --> column1 specified in schema but due to initial column is empty bydefault form source which not have any column name and that why on doing join based on key giving different column value from sheet as talend is assuming 1 blank column in sheet as schema first column data.
eg; row1 is
| |id|name|
| |123|"Joe"|
| |124| "Jack"|
So on asking row1.id for join it inspite of taking 123 taking NULL(first column of 1st record) and on taking row1.name giving 123 instead of "Joe" .
Not related but will help someone in future.
This solved the issue for my data set, if it helps others:
###STRING TO DATE - null:
( row3.myDate.equals("")
|| row3.myDate.isEmpty()
|| row3.myDate.equals("null")
|| row3.myDate.equals("NULL")
|| row3.myDate.equals("''")
|| row3.myDate==null
?null:TalendDate.parseDate("yyyy-MM-dd",TalendDate.formatDate("yyyy-MM-dd",TalendDate.parseDate("MM/dd/yyyy",row3.myDate) )
))
Thanks it worked for me.