温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

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

发布时间:2021-12-24 16:34:31 来源:亿速云 阅读:122 作者:柒染 栏目:互联网科技

今天就跟大家聊聊有关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该如何分析有进一步的了解吗?如果还想了解更多知识或者相关内容,请关注亿速云行业资讯频道,感谢大家的支持。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI