Skip to content

Pentaho PDI essentials, tips n' tricks

wolfderby edited this page Nov 12, 2024 · 20 revisions

faersdbstats - stage 0 - setting variables in Pentaho JVM

  • When setting vars by running stage_0_set_pentaho_vars.kjb if you get errors on first run, simply run again
  • If you've closed spoon between jobs you will need to reset variables by re-running stage_0's job.

Database connections

Within Pentaho (for stages_1 and higher) you should see your database connections on the left

image (note these database connections are saved in /path/to/your/.kettle/shared.xml)

  • After running stage_0 w/ a good config file you should be able to double click the db connections and click "test" to test the connection
  • Check with Tools > Database > Explore

Job tips

Ordering Steps

An example of a logic if's in between steps is in the meta.kjb w/ the SUCCESS IF LOAD_ALL_TIME=1 (red hop/arrow taken if fails; green hop taken if true)

image


Job creation

To quickly create a hop, left click on first step then center click first step and then center click on 2nd step.

Share your database connection to make them available to new jobs and transforms

image

To run only one step of a job

Click a green hop arrow to disable it, then click run, and set "Start job at:" image ^Example of only running stage_5


Transformations

Disabling a hop in a transform effectively disables the connected steps


Transform steps run in parallel however an example of a flow control blocking step (a "wait") is implemented in stage_4_faers_outc_log_qtrs.kjb


Anything downstream of a data-grid input will have to run, even after a switch


Some helpful getting started w/ Pentaho tutorials: https://www.youtube.com/watch?v=pKn2oWGM3RA&list=PLugvKv0YE9AzPehm2oArspyCRRwQMiN1o

Troubleshooting

  • For troubleshooting domain data files, see Stage_3's troubleshooting section

Q: Pentaho doesn't seem to have done anything, where do I look?

  • A: Check...
    • Execution Results > Logging Results tab
    • The terminal you launched ./spoon.sh in
    • BASE_FILE_DIR/logs/LOG_FILENAME (ie /parent_dir_of_your_repo/logs/)
    • ...if logging results blank
      • Check your wifi download and upload speeds
      • Resize windows
      • Click around in pentaho to see if Logging results appear

Q: Why's Pentaho showing weird characters like this:

image

  • A: You're attempting to use a font not available on the system, change Pentaho's look and feel to the fonts (Tools > Options > "Look & Feel" tab

**Q: I had to restart pentaho/spoon, and now my Stage 1-7 job has a lots of red error output:

image

-A: Re-run Stage_0 to set variables for Pentaho/Spoon they're stored in the JVM

Note to check variables values at any point find a dialog input box anywhere (like right click step

resource

https://pentaho-online.gitbook.io/how-to-pentaho-data-integration

Clone this wiki locally