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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Obtain log file and send it via email

Hello to everyone,
I need your help to solve this problem that I have, I will describe my scenario:
I have a master job and a lot of subjobs inside him, in all levels I am using a tJava to print into a Log file using the function:
-System.out.println("The name of the job Started/Ended, etc.")
When the deployment ends this log file is generated and I need to download it from the TAC to my computer (JobConductor --> Select the executed job --> Show Monitoring Grid --> Go to the page one of the Monitoring Grid --> Download entire log option);
If I executed from the TAC a master job with subjobs inside him, every time that the tJava ended will write into the same log file, if I executed only one of the child jobs, it will write into the log file without the information of the high level;
Now, I need to obtain the log file to send it via email (using a tSendMail component) every time a subjob ends, I know that I need to take it from the TAC server using a FTP, pasting into the Talend repository and take it from there with the tSendMail component like an attachment, the problem is that I noticed that the TAC using a different variables to named the log file and the path.
I need to capture the variables that the TAC uses to write the log path and name like the taskId, jobId, JobExecutionId, etc. in Talend Studio.
The name of the path looks like this:
/u01/talend/Tac/Logs/task_26/1404879029355_task_26_logs/
And the log file like this:
OUT_ERR_EXEC_20140708231256_oZpdp.log"
I noticed that the Data Base of the TAC uses the table taskexecutionhistory to preserve some history of the logs, so I think that I can make a connection from the Talend Studio to this Database and make a match with the idquartzjob or the idremotejobexecution to obtain the name of the log, but first I need to capture this variables from the Talend Studio,
I am open to suggestions, recomendations or more questions about this topic.
I hope you can help me.
Thank you for your time and considertion.
Regards.
Labels (4)
8 Replies
Anonymous
Not applicable
Author

Hi contreras,
Would you mind uploading your job design screenshots into forum so that we can get your current situation more precisely.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hello Sabrina,
thank you for your response,
I will put 3 images:
-the first shows how I am using tJava's for write into the log file;
-the second one shows how I'm obtaining at this moment the Log file from the TAC;
-and the third one shows how I'm trying to obtain the variables to get the log file and send it via email with the tSendMail from a Job before the master Job ends.
I am having problems with the last point because when the FTP search the log file into the TAC server can't find it, maybe the log file it been created by the TAC server until all jobs have finished, I don't know yet.
Regards!
0683p000009MEXP.png 0683p000009MELK.png 0683p000009MEJY.png
Anonymous
Not applicable
Author

Hi econtreras,
 
Could you indicate the build version you are using?
Would you mind connecting to the Support portal and logging your request, so that we can give you a remote assistance with priority, through the support cycle.
 
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi Sabrina,
I´m using the versión:
---Version: 5.3.1
---Build id: r104014
I solved this topic, I use system variables to obtain the log name and the path of logs files at the execution server, I am attaching images to solve it.
Regards!
Anonymous
Not applicable
Author

Hi,


 


Thanks for your feedback. Let us know is there any problem when you upload image into talend forum.


 


Best regards


Sabrina


             
_AnonymousUser
Specialist III
Specialist III

Hi,


 


Thanks for your feedback. Let us know is there any problem when you upload image into talend forum.


 


Best regards


Sabrina


             

Yes, let me try again to attach the images, I do not know why I can't attach the images yesterday.
Regards!
*I noticed that the web page have some problems while trying to log in.
Anonymous
Not applicable
Author

Hi,
I noticed that the web page have some problems while trying to log in.

What's the problem you got? Can you login to talend forum using your user name and password? Are you able to upload your image by chicking "Upload" button or dropping your file into "Drop files here to attache them" field directly?
Best regards
Sabrina
0683p000009MEGa.png
Anonymous
Not applicable
Author

Can someone provide the solution for this?