Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Friends
I need your help on clearing an issue, when i tried to implement SCD2 Concept
Below is my source
Cust_id Cust_ty_id Cust_nm Birth_dt
1 101 John null
When i tried to use tMap to compare the source and Lookup using the variable formula
row3.BIRTH_DT==null ||row2.BIRTH_DT==null?"1":row3.BIRTH_DT.equals(row2.BIRTH_DT)?"0":"1"
Im getting the Null pointer exception. Arrached the screenshot of the tMap and Job
@Vinothkumar Radhakrishnan ,the error might come from other expression such as TalendDate.parseDate(String pattern, String date_string) in the output table of tMap, go to check expression one by one and confirm which expression throws the error.
Regards
Shong
It's difficult to see all of your logic in the screenshots, but what is happening is that you are trying to call a method on an object that is null. The first thing that should be done before calling methods on objects is to ensure that the object is not null. I suspect that this is not the logic that is directly causing this, but the column methods that are called on the output of this logic. I see it is either 1 or 0. See if you can check the output data. I'd look at the dates that are being processed with methods as your first port of call.
Hi rhall
I have used
(row3.BIRTH_DT==null )? null :
row3.BIRTH_DT.equals(row2.BIRTH_DT)?"0":"1"
if birth_dt is null then insert/update as null else compare and set 1 or 0
Can you show us the exact error message you get please? By that I mean, the error reported in the output Window. Something is null when it is being called or being used if you are getting a NullPointerException.
@Vinothkumar Radhakrishnan ,the error might come from other expression such as TalendDate.parseDate(String pattern, String date_string) in the output table of tMap, go to check expression one by one and confirm which expression throws the error.
Regards
Shong