For the complete documentation index, see llms.txt. This page is also available as Markdown.

Logging

Implement database logging ..

PDI is configured to provide helpful log messages to help provide understanding in how a job or transformation is running. Logging can be configured to provide minimal logging information, just to know whether a job or transformation failed or was successful, or detailed in providing errors or w arnings such as network issues or mis-configurations.

• Nothing: Don't show any output

• Error: Only show errors

• Minimal: Only use minimal logging

• Basic: This is the default basic logging level

• Detailed: Give detailed logging output

• Debug: For debugging purposes, very detailed output.

• Row level: Logging at a row level, this can generate a lot of data.

When executing a job or transformation from within the Spoon development environment, a "Logging" tab is available, showing any log messages that have been generated. Any error messages are shown with red text, to easily identify the cause of any errors in the file.

In this guided demonstration, you will:

• Create Logging Database Tables in PostgreSQL hibernate database.

• Configure kettle.properties file for logging

• Examine Logging tables

For this demonstration, you will require pgAdmin 4 (or any database management tool) to create the required schema and database tables in PostgreSQL.

  1. Create a connection to the hibernate database:

Username

hibuser

Password

password

  1. Test the connection.

  2. Expand the hibernate database -> Schemas -> pentaho_dilogs -> Tables:

pentaho_dilogs

To enable logging you will need to edit the kettle.properties file to include the 'logging ' variables.

  1. Open the kettle.properies file in a text editor.

There are 3 properties to set (added in PDI 10+):

• name of table

• name of database connection

• name of database schema

  1. Save and reboot.

Ensure you have the Pentaho server up and running ..!!

This demonstration just gets you up and running with logging your Jobs and transformations to a bunch of loging tables. Its tricky to get any useful info out of these tables without resorting to some complex SQL querries.

Luckily .. Pentaho came up with Operations Mart. This is a centralized data mart that enables you to query the tables and display the info in dashboards as charts and reports.

  1. In PDI open the tr_hello_world.ktr

hello_world.ktr

Now we need to define a connection to the Pentaho Repository.

  1. Click on the 'Connect'button located in the top right corner.

  2. Click on Add.

  3. Select Pentaho Repository (Recommended)

Repository options
  1. Enter the following details.

Repository Manager
  1. Save and Close

  2. Connect to: 'Pentaho' Repository with the following credentials:

Login to Pentaho Repository
  1. Once connected, don't close open transformation.

  2. Save the tr_hello_world.ktr to Public -> folder. You will need to create the folder.

Save to Pentaho Repository
  1. Execute the transformation.

  2. In DBeaver: open and view the data in the trans_log table.

View trans_log

Last updated

Was this helpful?