linux kettle命令,Linux下用命令来执行kettle文件资源库的文件ktr与kjb的方法
1. 准备工作
一个简单的job,一个简单的trans。
trans:读取download目录下的所有文件名,输出为文件。【界面情况下测试成功】
成功生成目标文件:
job:创建文件。【界面模式测试执行成功】
执行结果:
把界面执行测试结果文件删除,以免影响观察。
2. linux环境以命令行方式执行job和trans
Pan是用于执行trans的PDI命令行工具。
Kitchen是用于执行作业的PDI命令行工具。
1
2
a. Pan的命令行选项和语法
语法:
pan.sh -option=value arg1 arg2
1
命令行参数:
SwitchPurpose
rep
Enterprise or database repository name, if you are using one
user
Repository username
pass
Repository password
trans
The name of the transformation (as it appears in the repository) to launch
dir
The repository directory that contains the transformation, including the leading slash
file
If you are calling a local KTR file, this is the filename, including the path if it is not in the local directory
level
The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing)
logfile
A local filename to write log output to
listdir
Lists the directories in the specified repository
listtrans
Lists the transformations in the specified repository directory
listrep
Lists the available repositories
exprep
Exports all repository objects to one XML file
norep
Prevents Pan from logging into a repository. If you have set the KETTLE_REPOSITORY, KETTLE_USER, and KETTLE_PASSWORD environment variables, then this option will enable you to prevent Pan from logging into the specified repository, assuming you would like to execute a local KTR file instead.
safemode
Runs in safe mode, which enables extra checking
version
Shows the version, revision, and build date
param
Set a named parameter in a name=value format. For example: -param:FOO=bar
listparam
List information about the defined named parameters in the specified transformation.
maxloglines
The maximum number of log lines that are kept internally by PDI. Set to 0 to keep all rows (default)
maxlogtimeout
The maximum age (in minutes) of a log line while being kept internally by PDI. Set to 0 to keep all rows indefinitely (default)
示例:
sh pan.sh -rep=initech_pdi_repo -user=pgibbons -pass=lumburghsux -trans=TPS_reports_2011
1
本地trans调用示例:
./pan.sh -file=/home/hadoop/workplace/kettle/trans/test_cml.ktr -norep
1
b.Kitchen的命令行参数及语法:
语法与Pan一样,参数有点不同。
Switchurpose
rep
Enterprise or database repository name, if you are using one
user
Repository username
pass Repository
password
job
The name of the job (as it appears in the repository) to launch
dir
The repository directory that contains the job, including the leading slash
file
If you are calling a local KJB file, this is the filename, including the path if it is not in the local directory
level
The logging level (Basic, Detailed, Debug, Rowlevel, Error, Nothing)
logfile
A local filename to write log output to
listdir
Lists the sub-directories within the specified repository directory
listjob
Lists the jobs in the specified repository directory
listrep
Lists the available repositories
export
Exports all linked resources of the specified job. The argument is the name of a ZIP file.
norep
Prevents Kitchen from logging into a repository. If you have set the KETTLE_REPOSITORY, KETTLE_USER, and KETTLE_PASSWORD environment variables, then this option will enable you to prevent Kitchen from logging into the specified repository, assuming you would like to execute a local KTR file instead.
version
Shows the version, revision, and build date
param
Set a named parameter in a name=value format. For example: -param:FOO=bar
listparam
List information about the defined named parameters in the specified job.
maxloglines
The maximum number of log lines that are kept internally by PDI. Set to 0 to keep all rows (default)
maxlogtimeout
The maximum age (in minutes) of a log line while being kept internally by PDI. Set to 0 to keep all rows indefinitely (default)
执行本地job的命令行语句:
/home/kettle/data-integration/kitchen.sh -file=/home/kettle/transition/move.kjb -log=log.log
1
形式:
$kitchen路径 -file=$job路径 log=$log路径
1
调用pan结果:
调用kitchen结果:
3.个人常用命令选项
由于我当前的工作环境都是执行本地的job和trans文件,所以常用的命令选项有:
命令描述
-file
job或trans文件路径
-norep
标明不是资源库里的文件
-param
参数设置
-logfile
log输出文件名
-level
log级别 (Basic, Detailed, Debug, Rowlevel, Error, Nothing)
linux kettle命令,Linux下用命令来执行kettle文件资源库的文件ktr与kjb的方法相关推荐
- linux 在文本模式下(命令模式)下,中文是乱码,如何解决?
linux 在文本模式下(命令模式)下,中文是乱码,如何解决? 转载于:https://blog.51cto.com/renxi/449690
- linux 定时执行kettle6,linux下使用crond定时执行kettle的job
由于第一次碰linux,对其不是很了解,导致这个问题困扰了我近一个月的时间,现在终于解决了,分享给大家. 首先,安装jre,配置java环境变量(一)下载jre-6u23-linux-x64.bin ...
- kettle在linux定时任务_linux下使用crond定时执行kettle的job
由于第一次碰linux,对其不是很了解,导致这个问题困扰了我近一个月的时间,现在终于解决了,分享给大家. 首先,安装jre,配置java环境变量(一)下载jre-6u23-linux-x64.bin ...
- linux su无效_Linux下su命令无反应的解决办法
一.问题产生环境 CentOS 6.3 X64 SecureCRT 7.0.0 英文版 二.问题具体描述 今天操作自己的一台Linux服务器时,突然su命令不好使了,敲入命令回车后,没有任何反应,不管 ...
- linux命令行下读取u盘内容_Linux拷贝U盘文件(命令行)
Linux系统有的有界面,有的没有只要命令窗口,因此导入外部文件就变得困难,没有可视化的方便. 这里通过挂载u盘进行文件拷贝. 首先挂载u盘:这里以centos为例 1.进入命令行模式下,输入命令 s ...
- Linux卸载tcpdump,Ubuntu下tcpdump命令(一)选项
Ubuntu下tcpdump命令(一)选项 说明,本文翻译自man tcpdump,若遇到不能理解的地方请参考man文档. Ubuntu默认是安装好了tcpdump工具的,如果没有安装的话使用sudo ...
- linux more 高亮_Linux下more命令高级用法
我们在 Linux 环境下工作时,每天肯定会跟各种各样的文本文件打交道.这些文件,有时候会非常长,无法在一屏的空间内显示完全.所以,在查看这种文件时,我们需要分页显示.这时,我们就可以使用 more ...
- 给linux系统增加rz功能,Linux系统教程_Linux下rz命令使用的详细实例
RZ和Linux的SZ命令命令可用于文件传输,和RZ命令用于上传文件,下面就举几个例子来介绍RZ指挥下详细使用Linux,一起分享学习linux系统教程的知识吧. RZ命令可以批量上传的文件,当然,你 ...
- Linux aptget 参数,ubuntu下apt-get 命令参数大全
Ubuntu下apt-get 命令参数大全,供大家参考. apt-cache search package 搜索包 apt-cache show package 获取包的相关信息,如说明.大小.版本 ...
- linux请求超时 ping_linux下ping命令使用详解
•ping命令一般用于检测网络通与不通,也叫时延,其值越大,速度越慢PING(PacketInternetGrope),因特网包探索器,用于测试网络连接量的程序. •ping发送一个ICMP回声请求消 ...
最新文章
- 人工智能 MIT 博士系列讲课
- AD5933不同频率下的转换结果
- java明星养成游戏_#IT明星不是梦#Java14不得不知的5个新功能
- 提升win双屏体验_海信双屏A6L评测,在自由阅读中植入护眼水墨屏
- python判断是否是小写字母_python判断字符串是字母 数字 大小写(转载)
- autoincrement mysql_SQL AUTO INCREMENT 字段 | 菜鸟教程
- 都已经十岁的ApacheDubbo,还能再乘风破浪吗?
- 重操JS旧业第五弹:函数
- 视觉SLAM笔记(17) 李代数求导与扰动模型
- Visual Studio 2019 RC入门——第1部分
- android画面传输到电视,如何将手机内容投屏到电视上?
- 详解Oracle数据货场中三种优化:分区、维度和物化视图
- apache无权限访问(You don't have permission to access /docs/index.html on this server)
- if语句 power query_判断(if)语句
- 【03】制作第一个zblog模板第三期,完成对接首页所有调用内容,将所有页面拆分公共页面和独立页面
- ubuntu 双屏显示的设置
- openjpeg:jpeg2000(j2k)图像内存压缩编码
- 绍兴一中信心赛 T1排列
- 如何正确创建电子邮件通讯(逐步)
- MEGAHIT:多快好省的宏基因组装工具
热门文章
- 干货实操!人人都能学会的Excel数据分析方法
- React的箭头函数详解
- Ubuntu 如何安装 微信?实测
- 对华为鸿蒙开源的看法,开源鸿蒙已经不属于华为,鸿蒙发展有哪些意义?
- 中国石油大学(北京)-《安全检测与监测》第一阶段在线作业
- 2022年电工(初级)考试报名及电工(初级)最新解析
- android如何替换contact的来电铃声
- A Pose Proposal and Refinement Network for Better 6D Object Pose Estimation
- three.js 渲染调优,如何提升3d场景更逼真的渲染效果
- 关键词、词库、关键词词库