Class PubsubLiteReadSchemaTransformProvider
java.lang.Object
org.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>
org.apache.beam.sdk.io.gcp.pubsublite.PubsubLiteReadSchemaTransformProvider
- All Implemented Interfaces:
SchemaTransformProvider
@AutoService(SchemaTransformProvider.class)
public class PubsubLiteReadSchemaTransformProvider
extends TypedSchemaTransformProvider<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Schema
buildSchemaWithAttributes
(Schema schema, List<String> attributes, String attributesMap) Builds a newSchema
by adding additional optional attributes and map field to the provided schema.Returns a description regarding theSchemaTransform
represented by theSchemaTransformProvider
.from
(PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration configuration) Produce a SchemaTransform from ConfigT.static SerializableFunction
<byte[], Row> getRawBytesToRowFunction
(Schema rawSchema) static SerializableFunction
<com.google.cloud.pubsublite.proto.SequencedMessage, Uuid> getUuidFromMessage
(String attributeId) Returns an id that uniquely represents this transform.Returns the input collection names of this transform.Returns the output collection names of this transform.Methods inherited from class org.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider
configurationSchema, dependencies, from
-
Field Details
-
VALID_FORMATS_STR
- See Also:
-
VALID_DATA_FORMATS
-
OUTPUT_TAG
-
ERROR_TAG
-
-
Constructor Details
-
PubsubLiteReadSchemaTransformProvider
public PubsubLiteReadSchemaTransformProvider()
-
-
Method Details
-
configurationClass
protected Class<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration> configurationClass() -
description
Description copied from interface:SchemaTransformProvider
Returns a description regarding theSchemaTransform
represented by theSchemaTransformProvider
. Please keep the language generic (i.e. not specific to any programming language). The description may be markdown formatted. -
from
public SchemaTransform from(PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration configuration) Description copied from class:TypedSchemaTransformProvider
Produce a SchemaTransform from ConfigT. Can throw aInvalidConfigurationException
or aInvalidSchemaException
. -
buildSchemaWithAttributes
public static Schema buildSchemaWithAttributes(Schema schema, List<String> attributes, String attributesMap) Builds a newSchema
by adding additional optional attributes and map field to the provided schema.- Parameters:
schema
- The base schema to which additional attributes and map field will be added.attributes
- A list of optional attribute names to be added as STRING fields to the schema.attributesMap
- The name of the optional map field to be added to the schema. If empty, no map field will be added.- Returns:
- A new
Schema
with the specified attributes and an optional map field. - Throws:
IllegalArgumentException
- if the schema is null or if any attribute name in the attributes list is null or empty.
-
getRawBytesToRowFunction
-
getUuidFromMessage
public static SerializableFunction<com.google.cloud.pubsublite.proto.SequencedMessage,Uuid> getUuidFromMessage(String attributeId) -
identifier
Description copied from interface:SchemaTransformProvider
Returns an id that uniquely represents this transform. -
inputCollectionNames
Description copied from interface:SchemaTransformProvider
Returns the input collection names of this transform. -
outputCollectionNames
Description copied from interface:SchemaTransformProvider
Returns the output collection names of this transform.
-