-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Feature][st-engine] Support for transform-v2 API
Release binary package: - Move engine starter jar from `lib/` to `starter/` dir - Outpout `seatunnel-transforms-v2.jar` to `lib/` dir Maven modules: - Add seatunnel-transforms-v2 module - Add seatunnel-transforms-v2-e2e module Engine Starter: - Add `lib/` to task execute classpath ST-Engine: - Support for Split、Replace、Filter transform E2E: - Copy `seatunnel-transforms-v2.jar` into container `lib/` dir - Improve get project root path for e2e test module
- Loading branch information
Showing
49 changed files
with
1,616 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Contribute Transform Guide | ||
|
||
This document describes how to understand, develop and contribute a transform. | ||
|
||
We also provide the [transform e2e test](../../../seatunnel-e2e/seatunnel-transforms-v2-e2e) | ||
to verify the data input and output by the transform. | ||
|
||
## Concepts | ||
|
||
Using SeaTunnel you can read or write data through the connector, but if you need to | ||
process your data after reading or before writing, then need to use transform. | ||
|
||
Use transform to make simple edits to your data rows or fields, such as split field, | ||
change field values, add or remove field. | ||
|
||
### DataType transform | ||
|
||
Transform receives datatype input from upstream(source or transform) and outputs new datatype to | ||
downstream(sink or transform), this process is datatype transform. | ||
|
||
|
||
| A | B | C | | ||
|-----------|-----------|-----------| | ||
| STRING | INT | BOOLEAN | | ||
|
||
| C | B | A | | ||
|-----------|-----------|-----------| | ||
| STRING | INT | BOOLEAN | | ||
|
||
| C | B | A | | ||
|-----------|-----------|-----------| | ||
| BOOLEAN | INT | STRING | | ||
|
||
|
||
|
||
|
||
| B | C | | ||
|-----------|-----------| | ||
| INT | BOOLEAN | | ||
|
||
| C | B | | ||
|-----------|-----------| | ||
| BOOLEAN | INT | | ||
|
||
| C | B | D | | ||
|-----------|-----------|-----------| | ||
| BOOLEAN | INT | FLOAT | | ||
|
||
|
||
### Data transform | ||
|
||
### Translation | ||
|
||
## Core APIs | ||
|
||
### SeaTunnelTransform | ||
|
||
```java | ||
/** | ||
* Set the data type info of input data. This method will be automatically called by translation. | ||
* | ||
* @param dataType The data type info of input. | ||
*/ | ||
void setTypeInfo(SeaTunnelDataType<T> dataType); | ||
|
||
/** | ||
* Get the data type of the records produced by this transform. | ||
* | ||
* @return SeaTunnel data type. | ||
*/ | ||
SeaTunnelDataType<T> getProducedType(); | ||
|
||
/** | ||
* Transform input data to {@link this#getProducedType()} type data. | ||
* | ||
* @param row the data need be transform. | ||
* @return transformed data. | ||
*/ | ||
T map(T row); | ||
``` | ||
|
||
### Abstract Templates | ||
|
||
#### SingleFieldOutputTransform | ||
|
||
#### MultipleFieldOutputTransform | ||
|
||
## Develop a Transform | ||
|
||
## Transform Test Tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.