获取kettle中的仓库路径

Get the repository path in kettle

我很难获得 kettle 正在使用的完整存储库路径。阅读有关变量 (link) 的帮助说明我可以使用“Internal.Transformation.Repository.Directory”或“${Internal.Job.Repository.Directory} " 取决于它是工作还是转换。这实际上有效,并且 returns 以 repo 为根的文件路径。
因为我需要文件(或回购)的 "full path" - 我尝试了“${Internal.Job.Filename.Directory}”(和转换)但是这个 returns 字符串 "Parent Job File Directory"(见下文)。
作为附加信息 - 我已连接到一个存储库。

任务 - 如何获取文件的完整路径 (job/transformation)?

转换调用者的目录是${Internal.Entry.Current:Directory}。这是因为一个作业可以包含一个作业,所以重要的是作业中条目的目录。

注意:如果您直接 运行 转换,而不是从作业中调用它,Internal.Job.Filename.File 将是通用的 "Parent Job File Name" 而不是“”。