同步操作将从 chen/kettle-scheduler-boot 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Serial Number | Item | Status | Priority |
---|---|---|---|
1 | Online management, edit kettle script | ✔ | Emergency |
2 | Cluster through source code, multi-threaded execution of tasks | ✔ | Urgent |
2 | Refactor the jpa part and change it to mybatis | ✔ | General |
The kettle scheduling project based on Spring-boot, refer to the code of zhaxiaodong9860 and reference the page management in it, and the back-end code refers to the API for tool-based writing, which is convenient to use Add the following functions to the original code
Click to view the demo environment Account: demo Password: demo@1234 **Demonstration environment, please be kind. **
Click to download the executable package Extraction code: e150
2020-12-17 update instructions
Screenshot of login page
Homepage screenshot (updated style)
New conversion task (updated style)
Add page transfer parameters for conversion tasks, and manually write data in json format
The trans_params field is added to the k_trans table of the database, and the corresponding entity class also needs to be added. When the task is executed, the parameters are obtained from the trans and set to the corresponding script
//className org.kettle.scheduler.system.biz.quartz.TransQuartz
@Override
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
...........
Integer transId = jobExecutionContext.getMergedJobDataMap().getInt("id");
// Get conversion
Trans trans = transService.getTransById(transId);
// Set execution parameters
Map<String, String> params = new HashMap<>(2);
String transParams = trans.getTransParams();
Map jsonToMap = JSON.parseObject(transParams);
params.putAll(jsonToMap);
if (StringUtil.hasText(trans.getSyncStrategy())) {
Integer day = Integer.valueOf(trans.getSyncStrategy().substring(2, trans.getSyncStrategy().length()));
params.put("start_time", DateUtil.getDateTimeStr(DateUtil.addDays(DateUtil.getTodayStartTime(), -day)));
params.put("end_time", DateUtil.getDateTimeStr(DateUtil.addDays(DateUtil.getTodayEndTime(), -day)));
}
.........
}
Online editing kettle script tool, the same usage as kettle on desktop
Project address: https://github.com/HiromuHota/pentaho-kettle
Resource library dictionary: https://35youth.cn/kettleRepository.html
Execute the kettle-scheduler-oracle.sql script under docs under kettle-scheduler-starter to create a table
Modify the database connection configuration in application-prod.yml when the generation environment is executed, and modify the database configuration in application-dev.yml in the development environment. If you need to modify the port, modify it in application.yml
Modify the application-kettle.yml configuration, set the log storage path, the kettle script storage path, and the kettle-home path (if the home path is not specified, the .kettle folder is under the current user root path)
If you need to write custom variables in kettle.properties, and copy the kettle.properties file to the .kettle folder under the kettle-home path
Start the project to use the scheduling platform (user name: admin, password: admin)
If you want to use [File Resource Library], you need to copy [file-rep] under the project separately to the set path, and configure the file resource library on the management page, because after packaging, kettle cannot access the files in the jar. So it needs to be stored separately
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。