[ https://issues.apache.org/jira/browse/BEAM-656 ]


    Danny McCormick deleted comment on BEAM-656:
    --------------------------------------

was (Author: JIRAUSER282469):
This issue has been migrated to https://github.com/apache/beam/issues/17928

> Add support for side inputs/outputs to Java 8 lambdas in MapElements
> --------------------------------------------------------------------
>
>                 Key: BEAM-656
>                 URL: https://issues.apache.org/jira/browse/BEAM-656
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-ideas
>            Reporter: Jani Patokallio
>            Priority: P3
>
> Currently there's no way to use side inputs or outputs within Java 8 lambdas 
> and MapElements.  It would be nice if you could do something like this:
> {code:java}
> PCollection<Integer> wordLengths = words.apply(
>     MapElements.via((String word) -> {
>       int sideInput1= [[[ GetSideInputHere(); ]]]
>       [[[ SetSideOutputHere ]]] (sideInput1+word.length());
>       return word.length();
>     }).withOutputType(new TypeDescriptor<Integer>() {});
> {code}



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

Reply via email to