`
start_p
  • 浏览: 65446 次
  • 性别: Icon_minigender_1
  • 来自: 西安
社区版块
存档分类
最新评论

kettle在linux下使用文件资源库

 
阅读更多

    用数据库作用kettle资源库会在数据库中建立很多表,所以就选择用文件资源库的方式。如果单纯的使用文件方式而非文件资源库的方式,在job引用转换的时候要选择文件本地路径,从windows移植到linux中路径就出现问题,虽然可以手动修改一下,但是每次都修改就烦人了。

 

 

 使用文件资源库就简单多了。

当然,使用资源库就需要上传.kettle文件夹到linux,如果在linux中使用过kettle的话,在用户目录下会自动建好.kettle文件夹,如果没有使用过,可能还没有这个文件夹,那就手动创建。不过创建了也并不可见。位置在/home/user/.kettle

我的资源库内容:repositories.xml

<?xml version="1.0" encoding="UTF-8"?>
<repositories>
  <repository>    <id>KettleFileRepository</id>
    <name>fileRepository</name>
    <description>filereposity</description>
   <base_directory>C&#x3a;&#x5c;Data&#x5c;kettleRepository</base_directory>
    <read_only>N</read_only>
    <hides_hidden_files>N</hides_hidden_files>
  </repository>  </repositories>

 

 <base_directory>部分是在windows下的资源库路径,上传到linux中需要改为linux下的资源库路径。然后可以将windows下设计好的转换和job都放到这个文件夹下。

最后是调用job脚本:/opt/kettle/data-integration/kitchen.sh -rep=fileRepository -job=testjob

指定资源库ID和job名称。

  • 大小: 11.6 KB
  • 大小: 26.2 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics