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

Announcements
Save an extra $150 Dec 1–7 with code CYBERWEEK - stackable with early bird savings: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

How to add logs for each events in my job?

Hello,
I have seen the objects in "Log and error" in the palette but I don't manage to add logs for every events in my job. I want to log:
- every line added to my datawarehouse
- every error
- every warning
Do you have an exemple which this type of need ?

I also need to log a warning if in my tmap a join is not possible. I explain:
I have two input table (table1 and table2) in my tmap and one output table.
For each line in table1 I have to find some informations in the table 2. To do that, I do a join.
I want to log a warning if a line from table1 don't have a matched line in table 2.

any idea?
Thank you in advance,
Chris
Labels (2)
6 Replies
Anonymous
Not applicable

Hi
If you want to get the lines which from table1 don't hava a matched line in table2, you can use tMap component to get the unmatched lines.
Please see the screenshot.
Best regards
shong
_AnonymousUser
Specialist III
Specialist III
Author

Hello,
Thank you for your help but I have still the problem. I have seen in the documentation the explanation of the use of Inner join with a reject table but I don't undertsand how to use it.
I think the best way will be to have an example. Do you know where I can find one?
Thank you,
Chris
Anonymous
Not applicable

Hi,
You can import the DEMO projects into your Talend Open Studio.
When you start the Studio, choose Import DEMO, select Java or Perl, you will have many JOBs in which you have documentations and using of many components and functionnalities.
Regards.
_AnonymousUser
Specialist III
Specialist III
Author

Hello,
Thanks a lot to help me and the demo project is very helpfull. I have found the example tMap_4 with a reject table but my situation is a little differente because I use two joins.
When I run the process, I have a NullPointerException when row6.pro_id is null.
This is my tMap

or here: http://chris38.wikispaces.com/space/showimage/tMapPb.gif
The most strange is that the job work well when I delete the table "row2" of the tMap, ie I can see the logs of reject_table (ie lines with row6.pro_id == null) and the logs of selling_table.
Do you have an idea,
Thanks,
Chris
_AnonymousUser
Specialist III
Specialist III
Author

Sorry about the image. You can see it better with the link http://chris38.wikispaces.com/space/sho ? tMapPb.gif.
I have not any answer. Maybe my question is not clear enough.
The table row5 is the main table. I need to access to the information pro_code_type in the row2 table.
To do that, I have to do a join between row5 and row6 with the field dep_id and a join between row6 and row2 with pro_id.
The problem is it is possible that row5.dep_id is null.
Actually, when row5.dep_id is null is null I have a nullPointerException just here in the code: row7HashKey.pro_id = row6.pro_id (because row6 is null).
I don't find a solution.
Any idea?
Thanks,
Chris
Anonymous
Not applicable

Hi chris23
I think the problem is "row6.pro_id" has null value. Because when you delete row2, it works well. The point of problem is between row2 and row6, I think.
You write "row6.pro_id != null". It means "If row6.pro_id is not null, Output values." not "If row6.pro_id is not null, Join with row2.pro_id".
I think so.
Forgive me if I'm wrong.