public abstract static class PubsubIO.Write<T> extends PTransform<PCollection<T>,PDone>
PubsubIO.write().| Modifier and Type | Class and Description |
|---|---|
class |
PubsubIO.Write.PubsubBoundedWriter
Writer to Pubsub which batches messages from bounded collections.
|
name| Constructor and Description |
|---|
Write() |
| Modifier and Type | Method and Description |
|---|---|
PDone |
expand(PCollection<T> input) |
void |
populateDisplayData(DisplayData.Builder builder) |
PubsubIO.Write<T> |
to(String topic)
Publishes to the specified topic.
|
PubsubIO.Write<T> |
to(ValueProvider<String> topic)
Like
topic() but with a ValueProvider. |
PubsubIO.Write<T> |
withIdAttribute(String idAttribute)
Writes to Pub/Sub, adding each record's unique identifier to the published messages in an
attribute with the specified name.
|
PubsubIO.Write<T> |
withTimestampAttribute(String timestampAttribute)
Writes to Pub/Sub and adds each record's timestamp to the published messages in an attribute
with the specified name.
|
getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, toString, validatepublic PubsubIO.Write<T> to(String topic)
See PubsubIO.PubsubTopic.fromPath(String) for more details on the format of the
topic string.
public PubsubIO.Write<T> to(ValueProvider<String> topic)
topic() but with a ValueProvider.public PubsubIO.Write<T> withTimestampAttribute(String timestampAttribute)
Instant.Instant(long) can be used to parse this value.
If the output from this sink is being read by another Beam pipeline, then
PubsubIO.Read.withTimestampAttribute(String) can be used to ensure the other source
reads these timestamps from the appropriate attribute.
public PubsubIO.Write<T> withIdAttribute(String idAttribute)
If the the output from this sink is being read by another Beam pipeline, then PubsubIO.Read.withIdAttribute(String) can be used to ensure that* the other source reads
these unique identifiers from the appropriate attribute.
public PDone expand(PCollection<T> input)
expand in class PTransform<PCollection<T>,PDone>public void populateDisplayData(DisplayData.Builder builder)
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class PTransform<PCollection<T>,PDone>Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.