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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
trimech
Contributor
Contributor

java.lang.NullPointerException Error

Hello, 

This my first post here and i hope that you can help me (i'm a begginer in TALEND) 

I have 4 table : 

Vente:ID_VENTE;PRIX_VENTE;DATE_VENTE;PRIX_ACHAT;ID_FOURNISSEUR;ID_VOITURE

Fournisseur; ID_FOURNISSEUR;NOMF;DATE_LIVRAISON

COmpte: ID_COMPTE;NOMC;MAIL;DATE_INSCRIPTION;ID_CLIENT;ID_FOURNISSEUR

Client: ID_CLIENT;NOM;VILLE. 

the question which i like to reply is :     Give the list of all customers who registered before the 2015-07-11 date and who bought car online    and the list of all customers who bought car Not online after 1999-01-20 and the price is smaller then 2000 euro.

0683p000009M72K.jpg

I used a TMAP to use my conditions.

0683p000009M72P.jpg

       and the expression conditons that i use are : 

 

First table 

row2.DATE_INSCRIPTION.before(TalendDate.parseDate("dd-MM-yyyy","11-07-2015")) && row2.MAIL != null

Second table : 

row2.MAIL==null && row4.DATE_VENTE.after(TalendDate.parseDate("dd-MM-yyyy","20-01-1999"))

 

and when i make it run, i get this error : 

0683p000009M72U.jpg

 

I didn't understant what he trying to tell me.

Please help.

Best regards , 

 

Trimech

Labels (2)
1 Solution

Accepted Solutions
JR1
Creator III
Creator III

Hi

It tries to tell you that you want to read from a property which has not been initialised yet. Possibly the date columns are null in some cases and you try to run a method (e.g. after) on such a column. I would first try the following.

Change your filter expressions as follows:

 

First table 

row2.DATE_INSCRIPTION != null && row2.MAIL != null && row2.DATE_INSCRIPTION.before(TalendDate.parseDate("dd-MM-yyyy","11-07-2015"))

Second table : 

row4.DATE_VENTE != null && row2.MAIL==null && row4.DATE_VENTE.after(TalendDate.parseDate("dd-MM-yyyy","20-01-1999"))

 

Let us know if this helps.

View solution in original post

5 Replies
JR1
Creator III
Creator III

Hi

It tries to tell you that you want to read from a property which has not been initialised yet. Possibly the date columns are null in some cases and you try to run a method (e.g. after) on such a column. I would first try the following.

Change your filter expressions as follows:

 

First table 

row2.DATE_INSCRIPTION != null && row2.MAIL != null && row2.DATE_INSCRIPTION.before(TalendDate.parseDate("dd-MM-yyyy","11-07-2015"))

Second table : 

row4.DATE_VENTE != null && row2.MAIL==null && row4.DATE_VENTE.after(TalendDate.parseDate("dd-MM-yyyy","20-01-1999"))

 

Let us know if this helps.

trimech
Contributor
Contributor
Author

Thanks a lot JR. 

It works but in the result i get so many time the same result like in the picture.

0683p000009M5WF.jpg

 

 

I think there is somthing wrong in my Tmap. Can you see it ? 

Thanks, 

Trimech

JR1
Creator III
Creator III

It may be that the Match Model is set up incorrectly in your lookups. Can you please provide a screenshot of your tMap where the lookup settings are expanded (the lollipops with the "1" in red on top of the lookups row2 and row4)? This should be set to "Unique Match" or "First Match".

trimech
Contributor
Contributor
Author

here are the catches. 

Thanks 

0683p000009M733.jpg0683p000009M738.jpg

JR1
Creator III
Creator III

Hm. This actually looks OK. Are you sure that your input does not contain e.g. six records with ID_CLIENT = 1 and six with ID_CLIENT = 7? If this were the case, then I would expect this output. You could always aggregate the input or the output over all columns by using a tAggregate component before or after tMap, if you are after distinct records.