public abstract static class MongoDbIO.Read extends PTransform<PBegin,PCollection<org.bson.Document>>
PTransform
to read data from MongoDB.name
Constructor and Description |
---|
Read() |
Modifier and Type | Method and Description |
---|---|
PCollection<org.bson.Document> |
expand(PBegin input)
Applies this
PTransform on the given InputT , and returns its
Output . |
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
void |
validate(PipelineOptions options)
Called before running the Pipeline to verify this transform is fully and correctly
specified.
|
MongoDbIO.Read |
withCollection(java.lang.String collection) |
MongoDbIO.Read |
withDatabase(java.lang.String database) |
MongoDbIO.Read |
withFilter(java.lang.String filter) |
MongoDbIO.Read |
withNumSplits(int numSplits) |
MongoDbIO.Read |
withUri(java.lang.String uri)
Example documentation for withUri.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString
public MongoDbIO.Read withUri(java.lang.String uri)
public MongoDbIO.Read withDatabase(java.lang.String database)
public MongoDbIO.Read withCollection(java.lang.String collection)
public MongoDbIO.Read withFilter(java.lang.String filter)
public MongoDbIO.Read withNumSplits(int numSplits)
public PCollection<org.bson.Document> expand(PBegin input)
PTransform
PTransform
on the given InputT
, and returns its
Output
.
Composite transforms, which are defined in terms of other transforms, should return the output of one of the composed transforms. Non-composite transforms, which do not apply any transforms internally, should return a new unbound output and register evaluators (via backend-specific registration methods).
expand
in class PTransform<PBegin,PCollection<org.bson.Document>>
public void validate(PipelineOptions options)
PTransform
By default, does nothing.
validate
in class PTransform<PBegin,PCollection<org.bson.Document>>
public void populateDisplayData(DisplayData.Builder builder)
PTransform
populateDisplayData(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 HasDisplayData
populateDisplayData
in class PTransform<PBegin,PCollection<org.bson.Document>>
builder
- The builder to populate with display data.HasDisplayData