Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello there ,
I am facing this issue with one of the Fixed width file while loading to target MY SQL where it gives null pointer exception.
even though I am handling it by using multiple ways not able to find the issue... can someone help me in this ?
I tried using .... StringHandling.LEN(row.P_LANG_CD1)==0 ? "anpdifddjl****" : row.P_LANG_CD1
(
row2.P_LANG_CD1.equals(null) &&
row2.P_LANG_CD2.equals(null) &&
row2.P_LANG_CD3.equals(null) &&
row2.P_LANG_CD4.equals(null) &&
row2.P_LANG_CD5.equals(null) &&
row2.P_LANG_CD6.equals(null) &&
row2.P_LANG_CD7.equals(null)
)
? null :
(
(Lang1.value.equals(null) && (row2.P_LANG_CD1 != null || row2.P_LANG_CD1 != "")) ||
(Lang2.value.equals(null) && (row2.P_LANG_CD2 != null || row2.P_LANG_CD2 != "")) ||
(Lang3.value.equals(null) && (row2.P_LANG_CD3 != null || row2.P_LANG_CD3 != "")) ||
(Lang4.value.equals(null) && (row2.P_LANG_CD4 != null || row2.P_LANG_CD4 != "")) ||
(Lang5.value.equals(null) && (row2.P_LANG_CD5 != null || row2.P_LANG_CD5 != "")) ||
(Lang6.value.equals(null) && (row2.P_LANG_CD6 != null || row2.P_LANG_CD6 != "")) ||
(Lang7.value.equals(null) && (row2.P_LANG_CD7 != null || row2.P_LANG_CD7 != ""))
) ? "Language code not found": null
To Identify the value which is troubling me I tried different ways as shown above and attacehd , but the value shows empty instead ... not sure how to resolve this issue.
Thanks for the update. Could you please mark the topic as resolved?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
Hi,
If you are using any Java function, you need to make sure that the incoming data for that column is not null. If you anticipate that any column may have null value also, you need to add a null check first before doing other operations.
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved
hey nikhil,
thanks for the reply , I sorted out the issue and its working fine now ...
will reach out to you if any help needed 🙂
Thanks for the update. Could you please mark the topic as resolved?
Warm Regards,
Nikhil Thampi
Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved