Is it possible to retrieve all logs messages store them into a file or show them at the end of an ETL Job?

138 views Asked by At

Introduction :

I work on a tool called Jedox. In this tool there is an ETL. This ETL can run job(job allow to execute multiple step from the ETL, by step I mean a set of operation on a table(most of the time)). Some jobs can just launch successively different step from etl, but there is another type of job than can run script. I try to run a job that use Groovy language. This language is very similar to Java, the two language share many similarity.

Context :

During the run, the ETL show message logs on a console. I can also print some message myself. Ex LOG.info("hello") will print Hello in the ETL Jedox Console. LOG is an object from the class ETLLogger. It's a specific class from Jedox library.

Question :

  1. With this logger, how can I get messages logs printed during the job's run ?
  2. With another Logger(from log4j for example) is it possible to get ALL logs message printed during a process ?

Goal :

I want those logs messages to print all the warnings happened during the job at the END of the job, because jedox console is very glitchy and I can't retrieve decent data from a simple copy and paste. Furthermore, if a just copy/paste all logs I had select only warning message manually. And if it's possible I want to write the logs that interest me in a file, it would be great !

Bonus : Here's a visual of Jedox ETL Console. enter image description here

2

There are 2 answers

1
RKa On

The Jedox ETL - Integrator comes with an own API, where the logger is an additional class. If you are working with the Groovy Job envrionment, than you have full access to all of the Classes and Methods. In your case the State Class would be helpful to get all Wanrnings or Errors of your current job/subjob. You can write the state items them to a seperate File or collect them into a Varialbe for further useage, as a example. The target can be a file, database or even a jedox olap cube.

Starting Point of the Groovy Scripting API: https://knowledgebase.jedox.com/integration/integrator-scripting-api.htm

Here is API Documentation of all Jedox ETL Classes: https://software.jedox.com/doc/2022_2/jedox_integrator_scripting_api_doc_2022_2/com/jedox/etl/components/scriptapi/package-summary.html

1
RKa On

How do I store all those logs in a file ? In Jedox you can create a new File-Load, which can be triggered by the 'main' groovy job. A good point to start is here: https://knowledgebase.jedox.com/integration/loads/file-load.htm