如何在Pentaho BI server v6 CE上部署预定的Kettle作业

问题描述 投票:2回答:3

我有一台运行Pentaho BI server v6 Community Edition的服务器。我们开发了一个Kettle作业,从一个数据库中提取到另一个数据库,导出为KJB文件。我想每隔12个小时就做一次这个工作。

我注意到BI服务器已经包含了Kettle,并且能够上传和安排作业。如果BI服务器已经安装了Kettle,是否需要安装DI服务器?

如果没有,我如何将KJB文件发布到BI服务器?我想使用文件系统存储库。如果我直接通过用户控制台上传文件,则日志显示导入成功,但我无法在任何地方选择或运行作业。

pentaho kettle
3个回答
4
投票

我使用Pentaho BI服务器5,但它应该在Pentaho BI 6上运行相同。

我的水壶工作经历了许多子变换。转换文件存储在文件系统目录中,例如/opt/etl

所以,假设我有一个工作(daily_job.kjb)有两个子转换。

要在Kettle job上运行Pentaho BI CE,我使用以下步骤:

  1. 在作业文件中正确设置转换位置
  2. 将子转换上传到服务器上的正确目录(/opt/etl
  3. 创建在BI服务器上执行xactionKettle job文件(daily.xaction
  4. daily.xactiondaily_job.kjb文件上传到Pentaho BI服务器(相同文件夹)
  5. 在Pentaho BI服务器上安排daily.xaction文件

daily_job.kjb的工作设置:

enter image description here

Xaction代码daily.xaction(只是它执行位于BI服务器中与daily_job.kjb相同的文件夹中的xaction):

<?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上安排Kettle作业(xaction文件):

enter image description here


0
投票

您可以将.kjb文件部署为Kettle端点作为Sparkl插件的一部分,然后使用简单的API请求调用它。这应该有所帮助:

http://fcorti.com/pentaho-sparkl/kettle-endpoint-sparkl-pentaho/

可能有其他方法可以做到这一点,但这是我最熟悉的方法。至于调度,你可以只安排一个发出API请求的cronjob吗?


0
投票

继续以下步骤:

  1. 以管理员身份启动pentaho bi服务器后登录pentaho控制台:

enter image description here

  1. 单击“浏览文件”按钮,将打开一个新页面。在此页面中,选择“文件夹”部分下的文件夹,然后单击右侧窗格中的“上载”。

enter image description here

  1. 选择一个文件,然后单击确定。

enter image description here

  1. 现在刷新页面,然后文件将反映在您的相应文件夹中。
  2. 现在安排工作。单击左窗格中的相应文件夹,在中间窗格中选择主作业文件,然后单击右窗格中的“计划”。 enter image description here
  3. 在新弹出窗口中,选择生成的文件路径,然后单击下一步。选择重复计划,作业时间和作业开始日期。

enter image description here

enter image description here

  1. 在下一个弹出窗口中选择“是”,您将被重定向到“管理计划”页面,您可以在其中看到刚刚安排的作业。它将在时间表运行。 enter image description here
  2. 您可以在pentaho-server / tomcat / logs目录中的pentaho.log文件中查看您的作业日志: tail -1000f /Users/kv/pentaho-server/tomcat/logs/pentaho.log
© www.soinside.com 2019 - 2024. All rights reserved.