广告
返回顶部
首页 > 资讯 > 精选 >kettle执行定时任务kitchen.bat该如何分析
  • 585
分享到

kettle执行定时任务kitchen.bat该如何分析

2023-06-04 12:06:31 585人浏览 薄情痞子
摘要

今天就跟大家聊聊有关kettle执行定时任务kitchen.bat该如何分析,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。环境操作系统:windows server 2008_x86

今天就跟大家聊聊有关kettle执行定时任务kitchen.bat该如何分析,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。

环境
操作系统windows server 2008_x86
etl:kettle6.0

Kettle是一个开源的ETL(Extract-TransfORM-Load的缩写,即数据抽取、转换、装载的过程)项目,项目名很有意思,水壶。按项目负责人Matt的说法:把各种数据放到一个壶里,然后呢,以一种你希望的格式流出。Kettle包括三大块:

Spoon——转换/工作(transform/job)设计工具 (GUI方式)
Kitchen——工作(job)执行器 (命令行方式)
Span——转换(trasform)执行器 (命令行方式)

Kettle是一款国外开源的etl工具,纯java编写,绿色无需安装,数据抽取高效稳定。Kettle中有两种脚本文件,transformation和job,transformation完成针对数据的基础转换,job则完成整个工作流的控制。

kitchen.bat后面可以是-也可以是/ 然后加上options
Options:
  /rep            : Repository name 资料库名称
  /user           : Repository username 资料库用户名
  /pass           : Repository passWord 资料库密码
  /job            : The name of the job to launch  job名
  /dir            : The directory (dont forget the leading /) job的目录
  /file           : The filename (Job XML) to launch  xml job的文件名
  /level          : The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing) 日志级别
  /logfile        : The logging file to write to 日志文件名
  /listdir        : List the directories in the repository 列出在档案库的目录
  /listjobs       : List the jobs in the specified directory 列出在特定目录下的job
  /listrep        : List the available repositories 列出可用的档案库
  /norep          : Do not log into the repository 不登陆档案库
  /version        : show the version, revision and build date 查看版本及创建日期
  /param          : Set a named parameter <NAME>=<VALUE>. For example -param:FILE=customers.csv
  /listparam      : List information concerning the defined parameters in the specified job.
  /export         : Exports all linked resources of the specified job. The argument is the name of a ZIP file.
  /custom         : Set a custom plugin specific option as a String value in the job using <NAME>=<Value>, for example: -custom:COLOR=Red
  /maxloglines    : The maximum number of log lines that are kept internally by Kettle. Set to 0 to keep all rows (default)
  /maxlogtimeout  : The maximum age (in minutes) of a log line while being kept internally by Kettle. Set to 0 to keep all rows indefinitely (default)


编写一个test_job.bat 内容如下:
D:
cd D:\Program Files\kettle\data-integration
kitchen.bat -rep kettlerep -user admin -pass admin -dir  /job_dir  -job job_name  -level=basic>D:\JOB_LOG\job_input.log
-rep kettlerep 指定资料档案库名称
-user admin -pass admin 用户名,密码
-dir  /job_dir 指定目录
-job job_name 设置job名称
-level=basic>D:\JOB_LOG\job_input.log设置日志级别及输出路径。

pan.bat 
Options:
  /rep            : 资源库名称
  /user          : 资源库用户名
  /pass          : 资源库密码
  /trans          : 要启动的转换名称
  /dir            : 目录(不要忘了前缀 /)
  /file           : 要启动的文件名(转换所在的 XML 文件)
  /level         : 日志等级 (基本, 详细, 调试, 行级, 错误, 没有)
  /logfile       : 要写入的日志文件
  /listdir        : 列出资源库里的目录
  /listtrans    : 列出指定目录下的转换
  /listrep       : 列出可用资源库
  /exprep      : 将资源库里的所有对象导出到 XML 文件中
  /norep        : 不要将日志写到资源库中
  /safemode       : 安全模式下运行: 有额外的检查
  /version        : 显示版本,校订和构建日期
  /param         : Set a named parameter <NAME>=<VALUE>. For example -param:FOO=bar
  /listparam     : List information concerning the defined named parameters in the specified transformation.
  /metrics        : Gather metrics during execution
  /maxloglines    : The maximum number of log lines that are kept internally by Kettle. Set to 0 to keep all rows (default)
  /maxlogtimeout  : The maximum age (in minutes) of a log line while being kept internally by Kettle. Set to 0 to keep all rows indefinitely (default)

看完上述内容,你们对kettle执行定时任务kitchen.bat该如何分析有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注编程网精选频道,感谢大家的支持。

--结束END--

本文标题: kettle执行定时任务kitchen.bat该如何分析

本文链接: https://www.lsjlt.com/news/237909.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作