当前位置:网站首页>ETL工具(数据同步) 二
ETL工具(数据同步) 二
2022-07-25 23:06:00 【无敌小田田】
kettle使用掌握之后,还需要掌握在linux下的定时执行的策略
一、kettle使用感觉较为方便
虽然kettle自带调度任务。但是前提是需要保持kettle打开。并且作业处在运行状态。不太适合用与远程服务器安装windows客户端,只限于学习使用
在linux安装kettle并通过调度是一个较为好用的方法
二、使用步骤
1、将kettle文件夹 data-integration 解压到linux服务器上 建立 /kettle/ 目录存放程序
2、建立目录存放kettle文件
mkdir /data/kettle/kettle_job //存放作业文件
mkdir /data/kettle/kettle_transition //存放转换
mkdir /data/kettle/kettle_sh //存放执行脚本
mkdir /data/kettle/kettle_log //存放执行kettle产生日志将从windows配置生成的 .ktr 和 .kjb 程序分别放在 transition目录 和 job目录
3、编写执行脚本
/data/kettle/kettle_sh/start.sh
#!/bin/bash
#执行job程序
cd /data/kettle/data-integration
export JAVA_HOME=/usr/local/jdk1.8.0_201/
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
./kitchen.sh -file=/data/kettle/kettle_job/testjob.kjb >>/data/kettle/kettle_log/ceshi_$(date +%Y%m%d).log
注:(因为crond是个守护进程,它不归属于任何用户,虽然之前以root用户配置了java环境变量, 但是crond一样找不到java命令,所以,当crond执行kettle任务时, 需要动态设置java环境变量,否则会出现手动执行.sh没问题,放crontb里面执行后无效果)
保存 start.sh,执行赋予权限命令
chmod +x start.sh测试脚本是否可以正常执行
sh -x start.sh4、设定crontab 定时执行任务
# crontab -e*/1 * * * * /data/kettle/kettle_sh/ceshi.sh //每分钟执行一次ceshi.sh
# systemctl restart crond
# systemctl enable crond生效完成
三、ETL kettle学习路径
2、
边栏推荐
- Basic knowledge of radar
- 为啥谷歌的内部工具不适合你?
- Why is Google's internal tools not suitable for you?
- Network Security Learning (XV) ARP
- How painful is it to write unit tests?
- Vs2017 compilation encountered the error HResult e returned by the call of COM component_ FAIL
- Hj7 take approximate value
- Session and cookie, token and storage
- Stack simulation queue
- 驱动板网线直连电脑共享网络配置
猜你喜欢

DHCP first static experiment

QT operation to solve large amount of duplicate data

QVariant的使用

Deep recursion, deep search DFS, backtracking, paper cutting learning.
![[interface performance optimization] reasons for index failure and how to optimize SQL](/img/b9/64058c823c4497ac36bfb62a101816.jpg)
[interface performance optimization] reasons for index failure and how to optimize SQL

Week 2: convolutional neural network

Recyclerview computehorizontalscrollextend computehorizontalscrollrange computehorizontalscroll for calculating the sliding distance

Kibana~ the process number cannot be found after kibana is started in the background

CUDA environment construction

Analysis of direction finding error of multi baseline interferometer system
随机推荐
Week 2: convolutional neural network
Ssh server CBC encryption mode vulnerability (cve-2008-5161)
CSV intro
QT string operation
Enabling partners, how can Amazon cloud technology "get on the horse and get a ride"?
Zcmu--5015: complete the task
通用分页功能
【论文笔记】A Meta-Reinforcement Learning Algorithm for Causal Discovery
Vs2019 WinForm clr20r3 error
赋能合作伙伴,亚马逊云科技如何落地“扶上马,送一程”?
QT Chinese programming encounters c2001 error, prompting "there is a newline character in the constant"
Opencv compile and call GPU version
向下扎根,向上生长,探寻华为云AI的“根”力量
[opencv] edge detection [API and source code implementation]
CMU AI PhD first year summary
Session and cookie, token and storage
Learning notes of technical art hundred people plan (2) -- vector
Analysis of Excel file
Network Security Learning (XIII) data link layer
Solve the problem phpstudy failed to import the database