博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
Kettle (五):Kettle做定时任务将pgsql导入oracle
阅读量:4280 次
发布时间:2019-05-27

本文共 751 字,大约阅读时间需要 2 分钟。

一、实现功能

Kettle实现定时更新的,从而,可以定时从pgsql中抽取数据到oracle。

二、环境

1.kettle8.0

2.oracle12c

三、新建pgsql到oracle转换

1.新建一个转换settime_transfer.ktr

 
2.其中表输入是pgsql的student_de表

3.插入更新模块

4.新建settime.job

(1)拖入相关组件

(2)将转换选择为之前创建的settime_transfer.ktr

四、定时任务的实现

1.使用kettle软件实现

(1)打开job
(2)确定时间间隔,单击“确定”
 
(3)点击“Run”,开始执行循环任务

(4)缺点:需要运行kettle程序,会造成一定的资源浪费。2.windows定时任务实现

(1)新建setTimejob.bat文件,写入任务脚本
(2)任务脚本

d:        ## Kitchen.bat所在路径盘符cd D:\Program Files\kettle\data-integration       ## Kitchen.bat所在目录## 作业的文件路径和日志文件路径## 执行kitchen执行job,并写入日志Kitchen /file:F:\...\02job\setTime.kjb /level:Base>>F:\...\test.log

(3)双击setTimejob.bat执行pgsql到oracle任务

(4)设置windows定时任务,执行刚刚脚本。

(5)在windows的搜索栏中,搜索“计划任务”
(6)点击“操作”-》“创建任务”
 
(7)输入任务名称

(8)点击“操作”-》“新建”,然后选择新建的bat文件

 
(9)选择“触发器”-》“新建”-》设定程序运行时间
 

转载地址:http://tgygi.baihongyu.com/

你可能感兴趣的文章
mtd and /dev/mtd*相關資料
查看>>
cp: cannot create symbolic link to fat format of usb: Operation not permitted
查看>>
MTD bad Block issue
查看>>
How to change network interface name
查看>>
ubifs and ubi and mtd
查看>>
shell script set 用法
查看>>
NAND BBT code
查看>>
英文序數寫法與唸法 Ordinal Numbers(轉載)
查看>>
介系詞 of 的用法
查看>>
How can I recover a file that I deleted in my local repo from the remote repo in Git?
查看>>
Rename files and folders with git
查看>>
Displaying git branch name in prompt does not work in screen
查看>>
git 常用指令
查看>>
Makefile – Check if a file exists using wildcard function
查看>>
makefile判斷資料夾否存在
查看>>
存minicom log
查看>>
檔案或目錄損毀而且無法讀取
查看>>
談 Coding Style 與 Naming Convention
查看>>
How to stop 'uninterruptible' process on Linux?
查看>>
Effective c++ 3/e item 15 疑問解惑
查看>>