Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sushantk19
Creator
Creator

handling null from source data

My logic is based on 2 source fields. both are of INTdatatype.

i have the logic as (row1.registrationchannel==null && row1.is_from_app==null)?null:null.

With the above logic, it gives me NULL pointer exception as below if both the columns have NULL values.

Exception in component tMap_1 (job_DM_001_Customer)

java.lang.NullPointerException

Is it possible to handle this in ETL or tmap somehow?

Labels (2)
7 Replies
vikramk
Creator II
Creator II

Could you check the false condition, you are trying to give null for both true and false condition also. which is not accepted

Anonymous
Not applicable

Hello,

Is your source field INT or integer data type?

Schemas allow you to specify if a column is nullable. This usually determines if it is an int or an Integer. You need to make it nullable.

Best regards

Sabrina

manodwhb
Champion II
Champion II

@Sushant Kapoor​ ,check the below screens should work.

0693p000009ovgbAAA.png

 

Thanks,

Manohar

sushantk19
Creator
Creator
Author

what is difference between the 2? i have used:

(row1.registrationchannel==null && row1.is_from_app==null)?null:null.

sushantk19
Creator
Creator
Author

yes, both are INT fields. Target field is defined as Nullable only in Database.

sushantk19
Creator
Creator
Author

can you be more clear. how do i check for false condition? can you update my logic and show me?

manodwhb
Champion II
Champion II

@Sushant Kapoor​ .check the below links.

https://www.tutorialspoint.com/difference-between-an-integer-and-int-in-java#:~:text=A%20Java%20both%20int%20and,Integer%20is%20of%20class%20type.&text=A%20int%20is%20a%20data,type%20int%20into%20an%20object.

 

https://stackoverflow.com/questions/8660691/what-is-the-difference-between-integer-and-int-in-java

 

Thanks,

Manohar