public static class DatastoreIO.Sink extends Sink<DatastoreV1.Entity>
Sink.WriteOperation<T,WriteT>, Sink.Writer<T,WriteT>| Modifier | Constructor and Description |
|---|---|
protected |
Sink(String host,
String datasetId)
Constructs a Sink with given host and dataset.
|
| Modifier and Type | Method and Description |
|---|---|
com.google.cloud.dataflow.sdk.io.DatastoreIO.DatastoreWriteOperation |
createWriteOperation(PipelineOptions options)
Returns an instance of a
Sink.WriteOperation that can write to this Sink. |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
void |
validate(PipelineOptions options)
Ensures the host and dataset are set.
|
DatastoreIO.Sink |
withDataset(String datasetId)
Returns a
Sink that is like this one, but will write to the specified dataset. |
DatastoreIO.Sink |
withHost(String host)
Returns a
Sink that is like this one, but will use the given host. |
public DatastoreIO.Sink withDataset(String datasetId)
Sink that is like this one, but will write to the specified dataset.public DatastoreIO.Sink withHost(String host)
Sink that is like this one, but will use the given host. If not specified,
the default host will be used.public void validate(PipelineOptions options)
validate in class Sink<DatastoreV1.Entity>public com.google.cloud.dataflow.sdk.io.DatastoreIO.DatastoreWriteOperation createWriteOperation(PipelineOptions options)
SinkSink.WriteOperation that can write to this Sink.createWriteOperation in class Sink<DatastoreV1.Entity>public void populateDisplayData(DisplayData.Builder builder)
SinkpopulateDisplayData(DisplayData.Builder) is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData). Implementations may call
super.populateDisplayData(builder) in order to register display data in the current
namespace, but should otherwise use subcomponent.populateDisplayData(builder) to use
the namespace of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class Sink<DatastoreV1.Entity>builder - The builder to populate with display data.HasDisplayData