etl的java实现_Kettle 是一款国外开源的 ETL 工具,纯 Java 编写

本文介绍了Pentaho Data Integration(Kettle),一个用Java编写的开源ETL工具。文章涵盖了项目的结构,包括核心实现、用户界面、引擎模块等。还详细说明了如何构建和测试该项目,包括必要的构建前提、Maven命令以及运行单元和集成测试的方法。此外,还提及了对IntelliJ用户的建议,并鼓励贡献者遵循特定的代码风格和测试规范。
摘要由CSDN通过智能技术生成

Pentaho Data Integration

Pentaho Data Integration ( ETL ) a.k.a Kettle

Project Structure

assemblies: Project distribution archive is produced under this module

core: Core implementation

dbdialog: Database dialog

ui: User interface

engine: PDI engine

engine-ext: PDI engine extensions

integration: Integration tests

How to build

Pentaho Data Integration uses the maven framework.

Pre-requisites for building the project:

Maven, version 3+

Java JDK 1.8

This settings.xml in your /.m2 directory

Building it

This is a maven project, and to build it use the following command

$ mvn clean install

Optionally you can specify -Drelease to trigger obfuscation and/or uglification (as needed)

Optionally you can specify -Dmaven.test.skip=true to skip the tests (even though you shouldn't as you know)

The build result will be a Pentaho package located in target.

Running the tests

Unit tests

This will run all unit tests in the project (and sub-modules). To run integration tests as well, see Integration Tests below.

$ mvn test

If you want to remote debug a single java unit test (default port is 5005):

$ cd core

$ mvn test -Dtest=<> -Dmaven.surefire.debug

Integration tests

In addition to the unit tests, there are integration tests that test cross-module operation. This will run the integration tests.

$ mvn verify -DrunITs

To run a single integration test:

$ mvn verify -DrunITs -Dit.test=<>

To run a single integration test in debug mode (for remote debugging in an IDE) on the default port of 5005:

$ mvn verify -DrunITs -Dit.test=<> -Dmaven.failsafe.debug

To skip test

$ mvn clean install -DskipTests

To get log as text file

$ mvn clean install test >log.txt

IntelliJ

Don't use IntelliJ's built-in maven. Make it use the same one you use from the commandline.

Project Preferences -> Build, Execution, Deployment -> Build Tools -> Maven ==> Maven home directory

Contributing

Submit a pull request, referencing the relevant Jira case

Attach a Git patch file to the relevant Jira case

Use of the Pentaho checkstyle format (via mvn checkstyle:check and reviewing the report) and developing working Unit Tests helps to ensure that pull requests for bugs and improvements are processed quickly.

When writing unit tests, you have at your disposal a couple of ClassRules that can be used to maintain a healthy test environment. Use RestorePDIEnvironment and RestorePDIEngineEnvironment for core and engine tests respectively.

pex.:

public class MyTest {

@ClassRule public static RestorePDIEnvironment env = new RestorePDIEnvironment();

#setUp()...

@Test public void testSomething() {

assertTrue( myMethod() );

}

}

Asking for help

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值