You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/07/26 02:03:38 UTC
[GitHub] [incubator-seatunnel] lcyyyyyy opened a new pull request, #2268: [Feature][transform]flink transform support multi split
lcyyyyyy opened a new pull request, #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268
…tion name
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/incubator-seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
## Purpose of this pull request
<!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
flink transform module support multi split,and add custome split function name
## Check list
* [x] Code changed are covered with tests, or it does not need tests for reason:
* [x] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [x] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#discussion_r929461472
##########
seatunnel-transforms/seatunnel-transforms-flink/seatunnel-transform-flink-split/src/main/java/org/apache/seatunnel/flink/transform/Split.java:
##########
@@ -94,6 +97,9 @@ public void prepare(FlinkEnvironment prepareEnv) {
if (config.hasPath(SEPARATOR)) {
separator = config.getString(SEPARATOR);
}
+ if (config.hasPath(NAME)) {
+ name = config.getString(NAME);
+ }
Review Comment:
This is not referenced
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lcyyyyyy commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
lcyyyyyy commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1196523795
> I don't understand what's the point of supporting changing the name of the Split function, is there something I haven't considered?
Seatunnel support multi source&sink, But when we use the Split function in flink-transform, we can only use one kind of separator ,like this:
sql = select split(raw_message) from source_table;
Now we can register different Spilt function with different separator ,Like the example I said above,
In order to distinguish them better, the names of the Split function is needed
The reason is that I have multiple data sources and may need to set different separator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lcyyyyyy commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
lcyyyyyy commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1196523258
>
Seatunnel support multi source&sink, But when we use the Split function in flink-transform, we can only use one kind of separator ,like this:
sql = select split(raw_message) from source_table;
Now we can register different Spilt function with different separator ,Like the example I said above,
In order to distinguish them better, the names of the Split function is needed
The reason is that I have multiple data sources and may need to set different separator
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lcyyyyyy commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
lcyyyyyy commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1197541901
> > > I don't understand what's the point of supporting changing the name of the Split function, is there something I haven't considered?
> >
> >
> > Seatunnel support multi source&sink, But when we use the Split function in flink-transform, we can only use one kind of separator ,like this: sql = select split(raw_message) from source_table; Now we can register different Spilt function with different separator ,Like the example I said above, In order to distinguish them better, the names of the Split function is needed
> > The reason is that I have multiple data sources and may need to set different separator
>
> I get you. In order that, you should add config for custom separator too.
SeaTunnel already support custom separator,default separator = " "
So ,support change the name of the Split function,will bring the feature to support register multi Split function with different separator&field
You can try the following flink.batch.conf,it worked
env {
execution.parallelism = 1
}
source {
FakeSource {
result_table_name = "test"
mock_data_size = 100
}
}
transform {
Split{
separator=" "
fields = ["word","name"]
name = "splitx"
}
Split{
separator="i"
fields = ["word","test"]
name = "splity"
}
Sql {
sql = "select splitx(name),splity(name) from test"
}
}
sink {
ConsoleSink{}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] Hisoka-X merged pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
Hisoka-X merged PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lcyyyyyy commented on a diff in pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
lcyyyyyy commented on code in PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#discussion_r929463174
##########
seatunnel-transforms/seatunnel-transforms-flink/seatunnel-transform-flink-split/src/main/java/org/apache/seatunnel/flink/transform/Split.java:
##########
@@ -94,6 +97,9 @@ public void prepare(FlinkEnvironment prepareEnv) {
if (config.hasPath(SEPARATOR)) {
separator = config.getString(SEPARATOR);
}
+ if (config.hasPath(NAME)) {
+ name = config.getString(NAME);
+ }
Review Comment:
> default split function name = split,but we can define name in config file,like this:
Split{
separator=" "
fields = ["word","name"]
name = "splitx"
}
Split{
separator="i"
fields = ["word","test"]
name = "splity"
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] lcyyyyyy commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
lcyyyyyy commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1197538706
> > > I don't understand what's the point of supporting changing the name of the Split function, is there something I haven't considered?
> >
> >
> > Seatunnel support multi source&sink, But when we use the Split function in flink-transform, we can only use one kind of separator ,like this: sql = select split(raw_message) from source_table; Now we can register different Spilt function with different separator ,Like the example I said above, In order to distinguish them better, the names of the Split function is needed
> > The reason is that I have multiple data sources and may need to set different separator
>
> I get you. In order that, you should add config for custom separator too.
SeaTunnel already support custom separator,default separator=" "
So,support change the name of the Split function ,will support register multi Split function with different separator&field
You can try the following flink.batch.conf,it worked
env {
# You can set flink configuration here
execution.parallelism = 1
}
source {
# This is a example input plugin **only for test and demonstrate the feature input plugin**
FakeSource {
result_table_name = "test"
mock_data_size = 100
}
# If you would like to get more information about how to configure seatunnel and see full list of input plugins,
# please go to https://seatunnel.apache.org/docs/flink/configuration/source-plugins/Fake
}
transform {
Split{
separator=" "
fields = ["word","name"]
name = "splitx"
}
Split{
separator="i"
fields = ["word","test"]
name = "splity"
}
Sql {
sql = "select splitx(name),name,splity(name) from test"
}
}
sink {
# choose stdout output plugin to output data to console
ConsoleSink{}
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1196536260
> > I don't understand what's the point of supporting changing the name of the Split function, is there something I haven't considered?
>
> Seatunnel support multi source&sink, But when we use the Split function in flink-transform, we can only use one kind of separator ,like this: sql = select split(raw_message) from source_table; Now we can register different Spilt function with different separator ,Like the example I said above, In order to distinguish them better, the names of the Split function is needed
>
> The reason is that I have multiple data sources and may need to set different separator
I get you. In order that, you should add config for custom separator too.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] CalvinKirs commented on a diff in pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
CalvinKirs commented on code in PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#discussion_r929464229
##########
seatunnel-transforms/seatunnel-transforms-flink/seatunnel-transform-flink-split/src/main/java/org/apache/seatunnel/flink/transform/Split.java:
##########
@@ -94,6 +97,9 @@ public void prepare(FlinkEnvironment prepareEnv) {
if (config.hasPath(SEPARATOR)) {
separator = config.getString(SEPARATOR);
}
+ if (config.hasPath(NAME)) {
+ name = config.getString(NAME);
+ }
Review Comment:
ok, thanks your explain
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1197563907
@lcyyyyyy Thanks, I missed that
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [incubator-seatunnel] Hisoka-X commented on pull request #2268: [Feature][transform]flink transform support multi split
Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on PR #2268:
URL: https://github.com/apache/incubator-seatunnel/pull/2268#issuecomment-1196178016
I don't understand what's the point of supporting changing the name of the Split function, is there something I haven't considered?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org