ahmedabu98 opened a new issue, #38528:
URL: https://github.com/apache/beam/issues/38528

   ### What would you like to happen?
   
   AFAIK the Java SDK doesn't have an easy utility to print/log the outputs of 
a PCollection. I've always had to hack something together like:
   
   ```java
       rows.apply(MapElements.into(strings()).via(row -> {
         System.out.println("row: " + row);
         return "";
       }));
   ```
   
   Would be nice to have an easy utility that can be used like:
   ```
       rows.apply(Log.info());
   ```
   
   The Python SDK has something like this: 
https://github.com/apache/beam/blob/26c6ec7cb749d60455c9895aa1be49d5cf552a75/sdks/python/apache_beam/transforms/util.py#L2183-L2197
   
   ### Issue Priority
   
   Priority: 2 (default / most feature requests should be filed as P2)
   
   ### Issue Components
   
   - [ ] Component: Python SDK
   - [x] Component: Java SDK
   - [ ] Component: Go SDK
   - [ ] Component: Typescript SDK
   - [ ] Component: IO connector
   - [ ] Component: Beam YAML
   - [ ] Component: Beam examples
   - [ ] Component: Beam playground
   - [ ] Component: Beam katas
   - [ ] Component: Website
   - [ ] Component: Infrastructure
   - [ ] Component: Spark Runner
   - [ ] Component: Flink Runner
   - [ ] Component: Prism Runner
   - [ ] Component: Twister2 Runner
   - [ ] Component: Hazelcast Jet Runner
   - [ ] Component: Google Cloud Dataflow Runner


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to