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 classstatic class -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic SchemabuildSchemaWithAttributes(Schema schema, List<String> attributes, String attributesMap) Builds a newSchemaby adding additional optional attributes and map field to the provided schema.Returns a description regarding theSchemaTransformrepresented 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:SchemaTransformProviderReturns a description regarding theSchemaTransformrepresented 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:TypedSchemaTransformProviderProduce a SchemaTransform from ConfigT. Can throw aInvalidConfigurationExceptionor aInvalidSchemaException. -
buildSchemaWithAttributes
public static Schema buildSchemaWithAttributes(Schema schema, List<String> attributes, String attributesMap) Builds a newSchemaby 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
Schemawith 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:SchemaTransformProviderReturns an id that uniquely represents this transform. -
inputCollectionNames
Description copied from interface:SchemaTransformProviderReturns the input collection names of this transform. -
outputCollectionNames
Description copied from interface:SchemaTransformProviderReturns the output collection names of this transform.
-