Kettle 内部.作业.文件名.目录
我是 Pentaho Kettle 的新手,我想知道 Internal.Job.Filename.Directory
是什么?
- 是我的
SPoon.bat
文件夹,还是我创建的 job/xfrm 文件夹? - 有没有办法可以将其更改为指向特定文件夹?
我在 Windows XP 中运行 spoon.bat
。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
Internal.Job.Filename.Directory
仅在不使用存储库时设置,并且会自动设置。您无法手动设置它。如何不使用存储库?
当您启动 Spoon 时,您会看到一个要求存储库的对话框。只需使用“取消”关闭此对话框即可!
我花了一段时间才找到这个:我想知道为什么
Internal.Job.Filename.Directory
总是空的。存储库是原因。它记录在这里:http://jira.pentaho.com/browse/PDI-7434
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 是始终可用的内部变量。它指向作业所在的目录。
您可以在此处找到更多信息。
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.
此变量现已在版本 7 及更高版本中弃用。您应该使用Internal.Entry.Current.Directory,无论存储库与否,这都有效,因此您可以构建更可移植的代码。
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 是kettle环境变量,指向磁盘上作业的位置。
Internal.Job.Filename.Directory is kettle environment variable which points to the location of job on disk.
要将值设置为变量Internal.Job.Filename.Directory,您需要在此启动作业
方式:
String filename="path_filename";
KettleEnvironment.init();
JobMeta jobMeta = new JobMeta(文件名, null);
作业 job = new Job(null, jobMeta);
作业.start();
job.waitUntilFinished();
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();
这是您当前作业所在文件夹的变量。
如果您不使用存储库,那么您需要指定转换的位置。
为了使其更加灵活,您可以将作业和转换放在同一个文件夹中
然后您可以使用Internal.Job.Filename.Directory。
所以如果你的转换被称为:my.ktr
然后要在作业中调用它,您可以通过 {Internal.Job.Filename.Directory}/my.ktr 指向它,
您可以在我的课程中了解更多信息:pentaho教程
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