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


##########
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:
   Only other word I can think of is "using" - "split on" and "split using" 
seem fairly similar, but I definitely prefer "on".
   
   It looks like you have a "hack" already by adding the quotes which works, 
but I found a similar issue on stack that overrides the way booleans are parsed 
which we could add to our `SafeLineLoader`
   https://stackoverflow.com/a/36463915
   which would keep from altering the yaml itself that would ultimately be 
surfaced in the display_data.



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