4

I am new to Pentaho Kettle and I am wondering what the Internal.Job.Filename.Directory is?

  • Is it my SPoon.bat folder, or the job/xfrm folder i created?
  • Is there a way I can change it to point to particular folder?

I am runnig spoon.bat in Windows XP.

fthiella
  • 48,073
  • 15
  • 90
  • 106
Sam Keith
  • 339
  • 1
  • 5
  • 5

6 Answers6

6

Internal.Job.Filename.Directory is only set when you don't use a repository, and it is set automatically. You cannot set it manually.

How not to use an repository?

When you start Spoon, you get a dialog which asks for a repository. Just close this dialog with cancel and you're fine!

It took me a while to find this: I was wondering why Internal.Job.Filename.Directory was always empty. The repository was the cause.

It's documented here: http://jira.pentaho.com/browse/PDI-7434

fthiella
  • 48,073
  • 15
  • 90
  • 106
Markus
  • 1,360
  • 1
  • 16
  • 22
5

Internal.Job.Filename.Directory is an internal variable that is always available. It points to the directory in which the job lives.

You can find more information here.

Andrea
  • 1,057
  • 1
  • 20
  • 49
  • 4
    Errm, I dont think this is set if you're using a database or enterprise repository though. – Codek Jun 04 '12 at 10:51
2

This variable is deprecated now in version 7 and newer. You should use Internal.Entry.Current.Directory and this works regardless of repository or not, hence you can build more portable code.

Codek
  • 5,114
  • 3
  • 24
  • 38
0

Internal.Job.Filename.Directory is kettle environment variable which points to the location of job on disk.

Sagar
  • 51
  • 2
  • 8
0

To set value to variable Internal.Job.Filename.Directory, you need to launch Job in this way:

String filename="path_filename"; KettleEnvironment.init(); JobMeta jobMeta = new JobMeta(filename, null); Job job = new Job(null, jobMeta); job.start(); job.waitUntilFinished();

0

this is the variable for your folder where the current job you are at resides. if you dont use repository then you need to specify where the transformations are.

to make it more flexible you can put the jobs and trasformations at the same folder and then you can use the Internal.Job.Filename.Directory.

so if your transformation is called : my.ktr then to call it in the job you can point to it by {Internal.Job.Filename.Directory}/my.ktr

you can learn more about it at my course : pentaho tutorial

itamars
  • 1
  • 3