Search code examples
pentahojobskettle

Getting the JOB_ID variable in Pentaho Data Integration


When you log a job in Pentaho Data Integration, one of the fields is ID_JOB, described as "the batch id- a unique number increased by one for each run of a job."

Can I get this ID? I can see it in my logging tables, but I want to set up a transformation to get it. I think there might be a runtime variable that holds an ID for the running job.

I've tried using the Get Variables and Get System Info transformation steps to no avail. I am a new Kettle user.


Solution

  • You have batch_ids of the current transformation and of the parent job available on the Get System Info step. On PDI 5.0 they come before the "command line arguments", but order changes with each version, so you may have to look it up.