Class Create.TimestampedValues<T>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<PBegin,PCollection<T>>
-
- org.apache.beam.sdk.transforms.Create.TimestampedValues<T>
-
- All Implemented Interfaces:
java.io.Serializable
,HasDisplayData
public static class Create.TimestampedValues<T> extends PTransform<PBegin,PCollection<T>>
APTransform
that creates aPCollection
whose elements have associated timestamps.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.apache.beam.sdk.transforms.PTransform
name, resourceHints
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PCollection<T>
expand(PBegin input)
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.Create.TimestampedValues<T>
withCoder(Coder<T> coder)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenCoder<T>
to decode each of the objects into a value of typeT
.Create.TimestampedValues<T>
withSchema(Schema schema, TypeDescriptor<T> typeDescriptor, SerializableFunction<T,Row> toRowFunction, SerializableFunction<Row,T> fromRowFunction)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenSchema
to represent objects.Create.TimestampedValues<T>
withType(TypeDescriptor<T> type)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenTypeDescriptor<T>
to determine theCoder
to use to decode each of the objects into a value of typeT
.-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
compose, compose, getAdditionalInputs, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Method Detail
-
withCoder
public Create.TimestampedValues<T> withCoder(Coder<T> coder)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenCoder<T>
to decode each of the objects into a value of typeT
.By default,
Create.TimestampedValues
can automatically determine theCoder
to use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistry
for details on how defaults are determined.Note that for
with no elements
, theVoidCoder
is used.
-
withSchema
@Experimental(SCHEMAS) public Create.TimestampedValues<T> withSchema(Schema schema, TypeDescriptor<T> typeDescriptor, SerializableFunction<T,Row> toRowFunction, SerializableFunction<Row,T> fromRowFunction)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenSchema
to represent objects.
-
withType
public Create.TimestampedValues<T> withType(TypeDescriptor<T> type)
Returns aCreate.TimestampedValues
PTransform like this one that uses the givenTypeDescriptor<T>
to determine theCoder
to use to decode each of the objects into a value of typeT
. Note that a default coder must be registered for the class described in theTypeDescriptor<T>
.By default,
Create.TimestampedValues
can automatically determine theCoder
to use if all elements have the same non-parameterized run-time class, and a default coder is registered for that class. SeeCoderRegistry
for details on how defaults are determined.Note that for
Create.TimestampedValues
with no elements, theVoidCoder
is used.
-
expand
public PCollection<T> expand(PBegin input)
Description copied from class:PTransform
Override this method to specify how thisPTransform
should be expanded on the givenInputT
.NOTE: This method should not be called directly. Instead apply the
PTransform
should be applied to theInputT
using theapply
method.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).
- Specified by:
expand
in classPTransform<PBegin,PCollection<T>>
-
-