如何在Pentaho BI服务器v6 CE上部署计划的Kettle作业 [英] How to deploy scheduled Kettle jobs on Pentaho BI server v6 CE
问题描述
我有一台运行Pentaho BI服务器v6社区版的服务器.我们已经开发了Kettle作业,可以从一个数据库提取到另一个数据库,并作为KJB文件导出.我想每12个小时左右执行一次这项工作.
I have a server running Pentaho BI server v6 Community Edition. We've developed a Kettle job to extract from one database to another, exported as a KJB file. I would like to run this job every 12 or so hours.
我注意到BI服务器已经包含Kettle,并且具有上载和计划作业的能力.如果BI服务器已经安装了Kettle,我是否需要安装DI服务器?
I noticed that the BI server already included Kettle, and has the ability to upload and schedule jobs. Do I need to install the DI server if the BI server already has Kettle installed?
如果没有,如何将KJB文件发布到BI服务器?我想使用文件系统存储库.如果我直接通过用户控制台上传文件,日志将显示导入成功,但是我无法在任何地方选择或运行该作业.
If not, how can I publish the KJB file into the BI server? I'd like to use a file system repository. If I upload the file directly through the user console the log shows that the import was a success, but I cannot select or run the job anywhere.
推荐答案
我使用Pentaho BI服务器5,但在Pentaho BI 6上应该可以正常使用.
I use Pentaho BI server 5, but it should work same on Pentaho BI 6.
我的水壶工作运行许多子转换.转换文件存储在文件系统目录中,例如/opt/etl
.
My Kettle job runs many sub-transformations. Transformation files are stored on file system directory e.g. /opt/etl
.
所以可以说我有一份工作(daily_job.kjb
),其中有两个子转换.
So lets say I have one job (daily_job.kjb
) with two sub-transformations.
要在Pentaho BI CE
上运行Kettle job
,请执行以下步骤:
To run a Kettle job
on Pentaho BI CE
I use those steps:
- 在作业文件中正确设置转换位置
- 将子转换上传到服务器(
/opt/etl
)上的正确目录 - 创建在BI服务器(
daily.xaction
)上执行Kettle job
的xaction
文件 - 将
daily.xaction
和daily_job.kjb
文件上传到Pentaho BI服务器(相同的文件夹)
Pentaho BI服务器上的 - 计划
daily.xaction
文件
- set up a transformation location properly in job file
- upload sub-transformations to proper directory on server (
/opt/etl
) - create
xaction
file which executesKettle job
on BI server (daily.xaction
) - upload
daily.xaction
anddaily_job.kjb
files to Pentaho BI server (same folder) - schedule
daily.xaction
file on Pentaho BI server
daily_job.kjb
中的作业设置:
Job settings in daily_job.kjb
:
Xaction代码daily.xaction
(仅执行与xaction
所在位置相同的BI服务器中相同文件夹中的daily_job.kjb
):
Xaction code daily.xaction
(simply it executes daily_job.kjb
located in same folder in BI server as where xaction
is):
<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>My scheduled job</title>
<version>1</version>
<logging-level>ERROR</logging-level>
<documentation>
<author>mzy</author>
<description>Sequence for running daily job.</description>
<help/>
<result-type/>
<icon/>
</documentation>
<inputs>
</inputs>
<outputs>
<logResult type="string">
<destinations>
<response>content</response>
</destinations>
</logResult>
</outputs>
<resources>
<job-file>
<solution-file>
<location>daily_job.kjb</location>
<mime-type>text/xml</mime-type>
</solution-file>
</job-file>
</resources>
<actions>
<action-definition>
<component-name>KettleComponent</component-name>
<action-type>Pentaho Data Integration Job</action-type>
<action-inputs>
</action-inputs>
<action-resources>
<job-file type="resource"/>
</action-resources>
<action-outputs>
<kettle-execution-log type="string" mapping="logResult"/>
<kettle-execution-status type="string" mapping="statusResult"/>
</action-outputs>
<component-definition>
<kettle-logging-level><![CDATA[info]]></kettle-logging-level>
</component-definition>
</action-definition>
</actions>
</action-sequence>
在Pentaho BI CE上计划水壶作业(xaction文件):
这篇关于如何在Pentaho BI服务器v6 CE上部署计划的Kettle作业的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!