简体   繁体   English

将pentaho日志加载到字段

[英]Load pentaho Log to a field

Pentaho db loggging option has to load log of particular transformation to a field called LOG_FIELD. Pentaho db loggging选项必须将特定转换的日志加载到名为LOG_FIELD的字段中。

I'm trying to create a custom table, where I wanted to load the log to a field. 我正在尝试创建一个自定义表,我想在其中将日志加载到字段中。 How to extract and load the log at each transformation level?? 如何在每个转换级别提取和加载日志?

  1. Click anywhere on the the transformation you want to log, and select Properties... of the drop down menu. 单击要记录的转换上的任意位置,然后从下拉菜单中选择“ Properties... ”。
  2. Select the Logging tab. 选择“ Logging选项卡。
  3. On the left select Transformation (Easy to forget). 在左侧,选择Transformation (易于忘记)。
  4. Define the database connection and a table name (preferably an non-exiting table). 定义数据库连接和表名称(最好是不存在的表)。
  5. Select the fields you want to log. 选择要记录的字段。
    • Specify the step to be used to count the LINES_READ, LINES_WRITTEN,... 指定用于计算LINES_READ,LINES_WRITTEN,...的步骤
    • Do not uncheck the LOG_FIELD which is the one you are looking for. 请勿取消选中要查找的LOG_FIELD。
    • Caution: the START_DATE is not what you think, the time at which the run started is called the RELAY_DATE. 警告:START_DATE不是您所想的,开始运行的时间称为RELAY_DATE。 The misnamed START_DATE is the date of the last run of the same transformation, used for incremental update. 误命名的START_DATE是同一转换的上次运行日期,用于增量更新。
  6. Set a logging interval (example 2 sec), in case you want to follow the run from the database. 设置日志记录间隔(例如2秒),以防您要跟踪数据库中的运行。
  7. Press the SQL button to create the table. 按SQL按钮创建表。

That's all. 就这样。 When you run the transformation, the selected fields will be written on the database. 运行转换时,所选字段将被写入数据库。

Note: If you want to do this systematically for all transformations, edit the kettle.poroperties (top menu Edit ) and define the variables KETTLE_TRANS_LOG_DB and KETTLE_TRANS_LOG_TABLE once for all. 注意:如果要系统地对所有转换执行此操作,请编辑kettle.poroperties (顶部菜单Edit ),并一次定义变量KETTLE_TRANS_LOG_DB和KETTLE_TRANS_LOG_TABLE。 And remember, the kettle.properties may be different on your dev machine and your prod server. 请记住,kettle.properties在您的开发机和产品服务器上可能有所不同。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM