开发者

Kettle Internal.Job.Filename.Directory

I开发者_Python百科 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.


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


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.


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.


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


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();


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜