public class View
extends java.lang.Object
PCollectionViews from PCollections,
for consuming the contents of those PCollections as side inputs
to ParDo transforms.| Modifier and Type | Class and Description |
|---|---|
static class |
View.AsIterable<T>
A that produces a
PCollectionView of a singleton PCollection
yielding the single element it contains. |
static class |
View.AsSingleton<T>
A that produces a
PCollectionView of a singleton PCollection
yielding the single element it contains. |
static class |
View.CreatePCollectionView<R,T,WT>
Creates a primitive PCollectionView.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> View.AsIterable<T> |
asIterable()
Returns a
View.AsIterable that takes a
PCollection as input and produces a PCollectionView
of the values, to be consumed as an iterable side input. |
static <T> View.AsSingleton<T> |
asSingleton()
Returns a
View.AsSingleton transform that takes a singleton
PCollection as input and produces a PCollectionView
of the single value, to be consumed as a side input. |
public static <T> View.AsSingleton<T> asSingleton()
View.AsSingleton transform that takes a singleton
PCollection as input and produces a PCollectionView
of the single value, to be consumed as a side input.
If the input PCollection is empty,
throws NoSuchElementException in the consuming
DoFn.
If the input PCollection contains more than one
element, throws IllegalArgumentException in the
consuming DoFn.
public static <T> View.AsIterable<T> asIterable()
View.AsIterable that takes a
PCollection as input and produces a PCollectionView
of the values, to be consumed as an iterable side input.