Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
I used a TMAP to use my conditions.
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 :
I didn't understant what he trying to tell me.
Please help.
Best regards ,
Trimech
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.
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.
Thanks a lot JR.
It works but in the result i get so many time the same result like in the picture.
I think there is somthing wrong in my Tmap. Can you see it ?
Thanks,
Trimech
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".
here are the catches.
Thanks
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.