[
https://issues.apache.org/jira/browse/FLINK-18627?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17166214#comment-17166214
]
Aljoscha Krettek commented on FLINK-18627:
------------------------------------------
I tend to agree with [~sjwiesman] here: {{filter()}} classically is an
operation that only filters data while {{split}} (or using OutputTags) allows
splitting a stream into multiple streams.
I don't yet see how you would actually get the {{corruptedData}} in your
example:
{code}
final OutputTag<String> curruptedData = new OutputTag<Integer>("side-output"){};
datastream
.filter(i->i%2==0).sideOutFilteredRecords(curruptedData)
.filter(i->i%3==0).sideOutFilteredRecords(curruptedData)
.filter(i->i%4==0).sideOutFilteredRecords(curruptedData)
.filter(i->i%5==0).sideOutFilteredRecords(curruptedData)
{code}
What would be the code to get a stream of all the {{corruptedData}} records?
> Get unmatch filter method records to side output
> ------------------------------------------------
>
> Key: FLINK-18627
> URL: https://issues.apache.org/jira/browse/FLINK-18627
> Project: Flink
> Issue Type: Improvement
> Components: API / DataStream
> Reporter: Roey Shem Tov
> Priority: Major
> Fix For: 1.12.0
>
>
> Unmatch records to filter functions should send somehow to side output.
> Example:
>
> {code:java}
> datastream
> .filter(i->i%2==0)
> .sideOutput(oddNumbersSideOutput);
> {code}
>
>
> That's way we can filter multiple times and send the filtered records to our
> side output instead of dropping it immediatly, it can be useful in many ways.
>
> What do you think?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)