Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-656

Add support for side inputs/outputs to Java 8 lambdas in MapElements

Details

    • Improvement
    • Status: Open
    • P3
    • Resolution: Unresolved
    • None
    • None
    • sdk-ideas
    • None

    Description

      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:

      PCollection<Integer> wordLengths = words.apply(
          MapElements.via((String word) -> {
            int sideInput1= [[[ GetSideInputHere(); ]]]
            [[[ SetSideOutputHere ]]] (sideInput1+word.length());
            return word.length();
          }).withOutputType(new TypeDescriptor<Integer>() {});
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            jpatokal Jani Patokallio
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated: