@Experimental(value=SOURCE_SINK) public class Write extends Object
PTransform that writes to a Sink. A write begins with a sequential global
initialization of a sink, followed by a parallel write, and ends with a sequential finalization
of the write. The output of a write is PDone. In the case of an empty PCollection, only
the global initialization and finalization will be performed.
Currently, only batch workflows can contain Write transforms.
Example usage:
p.apply(Write.to(new MySink(...)));
| Modifier and Type | Class and Description |
|---|---|
static class |
Write.Bound<T>
A
PTransform that writes to a Sink. |
| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
static <T> Write.Bound<T> |
to(Sink<T> sink)
Creates a Write transform that writes to the given Sink.
|
public static <T> Write.Bound<T> to(Sink<T> sink)