CARVIEW |
Select Language
HTTP/2 200
server: Apache
last-modified: Sat, 19 Jul 2025 17:42:10 GMT
etag: "b08f-63a4bc3198f59-gzip"
content-encoding: gzip
access-control-allow-origin: *
content-security-policy: frame-src 'self' https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/ ;
content-type: text/html
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
age: 0
date: Sat, 19 Jul 2025 18:21:08 GMT
x-served-by: cache-hel1410028-HEL, cache-bom4741-BOM
x-cache: HIT, MISS
x-cache-hits: 1, 0
x-timer: S1752949268.126071,VS0,VE159
vary: Accept-Encoding
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-length: 9482
Filter
Filter
Given a predicate, filter out all elements that don’t satisfy that predicate. May also be used to filter based on an inequality with a given value based on the natural ordering of the element.
Examples
Example 1: Filtering with a predicate
The result is a
PCollection
containing “Hello” and “world”.Example 2: Filtering with an inequality
Other variants include
Filter.greaterThanEq
, Filter.lessThan
and Filter.equal
.Example 3: Filtering with lambda
Related transforms
- FlatMapElements behaves the same as
Map
, but for each input it might produce zero or more outputs. - ParDo is the most general element-wise mapping operation, and includes other abilities such as multiple output collections and side-inputs.
Last updated on 2025/07/19
Have you found everything you were looking for?
Was it all useful and clear? Is there anything that you would like to change? Let us know!