Page 1 of 1

Read Log of another jog

Posted: Fri Feb 09, 2007 6:54 am
by RAI ROUSES
Hi,
With one job I want to access to the logs of others jobs, that i had already run, and know how many records had been read/ written, in one specific link.
How can I do that?

regards
Rai

Posted: Fri Feb 09, 2007 7:46 am
by DSguru2B
You have a few different ways. You can use DSGetJobInfo() function. You can use DSGetLinkInfo(). You can use DSGetLogSummary.
Log files are stored in hashed files with the naming convention RT_LOGnnn where nnn is the internal id for a specific job. You can get that from DS_JOBS.
Yet another way is to do it at the unix level by writing a script and parsing through the log file to get what you want.

Posted: Fri Feb 09, 2007 7:52 am
by chulett
In other words, you don't need to read the other job's log to get that information. There are functions to allow you to check the job directly if all you want is the information from its most recent run.

There are also functions to pull information from logs, DSGuru noted one such. There are also all the same equivalents using the 'dsjob' command at the command line in a script.

I would counsel against querying the repository directly as it is the least 'future proof' methodology you could choose. Best to stick with the published APIs. IMHO.

Posted: Fri Feb 09, 2007 9:54 pm
by kduke
There is a job in EtlStats which extract the row counts from old runs not just the current run which is waht the API will do. It will post these to a hashed file so you can post these to the regular tables like ETL_ROW_HIST. The job name is EtlGetRowCountsFromLog.