robertwb commented on code in PR #30368:
URL: https://github.com/apache/beam/pull/30368#discussion_r1513693116


##########
website/www/site/content/en/documentation/sdks/yaml-udf.md:
##########
@@ -207,6 +207,73 @@ criteria. This can be accomplished with a `Filter` 
transform, e.g.
     keep: "col2 > 0"
 ```
 
+## Splitting
+
+It can also be useful to send different elements to different places
+(similar to what is done with side outputs in other SDKs).
+While this can be done with a set of `Filter` operations, if every
+element has a single destination it can be more natural to use a `Split`
+transform instead which send every element to a unique output.
+For example, this will send all elements where `col1` is equal to `"a"` to the
+output `Split.a`.
+
+```
+- type: Split
+  input: input
+  config:
+    destination: col1
+    outputs: ['a', 'b', 'c']
+
+- type: SomeTransform
+  input: Split.a
+  config:
+    param: ...
+
+- type: AnotherTransform
+  input: Split.b
+  config:
+    param: ...
+```

Review Comment:
   BTW, though this hack (not needed any more) works, one big downside is that 
it would cause issues for any other tools that might want to parse or otherwise 
manipulate pipeline definitions (which may or may not be part of Beam). 



-- 
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