In Pentaho the directory where the current job is stored in the variable:
${Internal.Job.Filename.Directory}
But how can I move backward to get the parent directories ? I want to use it to set a variable value.
Any help please !!!
In Pentaho the directory where the current job is stored in the variable:
${Internal.Job.Filename.Directory}
But how can I move backward to get the parent directories ? I want to use it to set a variable value.
Any help please !!!
Copyright © 2021 Jogjafile Inc.
${Internal.Job.Filename.Directory}/..
from there you can just continue in the path. So if you need to go up one folder and then in a folder parallel to your files directory named folderA, just use:
${Internal.Job.Filename.Directory}/../folderA
going up multiple folders is also possible:
${Internal.Job.Filename.Directory}/../../../folderA
To set this as a variable, just at the beginning of the job make a transformation step, calling a new transformation.
and then in the transformation:
Then you can use the new relative path (in this case 4 levels up and then into the temp folder, leading to "c:/temp") anywhere within followup transformations by calling ${filepath}