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:
org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider
@AutoService(org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider.class) public class PubsubLiteReadSchemaTransformProvider extends org.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPubsubLiteReadSchemaTransformProvider.ErrorFnstatic classPubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration
-
Field Summary
Fields Modifier and Type Field Description static org.apache.beam.sdk.values.TupleTag<org.apache.beam.sdk.values.Row>ERROR_TAGstatic org.apache.beam.sdk.values.TupleTag<org.apache.beam.sdk.values.Row>OUTPUT_TAGstatic java.util.Set<java.lang.String>VALID_DATA_FORMATSstatic java.lang.StringVALID_FORMATS_STR
-
Constructor Summary
Constructors Constructor Description PubsubLiteReadSchemaTransformProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static org.apache.beam.sdk.schemas.SchemabuildSchemaWithAttributes(org.apache.beam.sdk.schemas.Schema schema, java.util.List<java.lang.String> attributes, java.lang.String attributesMap)Builds a newSchemaby adding additional optional attributes and map field to the provided schema.protected java.lang.Class<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>configurationClass()java.lang.Stringdescription()org.apache.beam.sdk.schemas.transforms.SchemaTransformfrom(PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration configuration)static org.apache.beam.sdk.transforms.SerializableFunction<byte[],org.apache.beam.sdk.values.Row>getRawBytesToRowFunction(org.apache.beam.sdk.schemas.Schema rawSchema)static org.apache.beam.sdk.transforms.SerializableFunction<com.google.cloud.pubsublite.proto.SequencedMessage,Uuid>getUuidFromMessage(java.lang.String attributeId)java.lang.Stringidentifier()java.util.List<java.lang.String>inputCollectionNames()java.util.List<java.lang.String>outputCollectionNames()
-
-
-
Field Detail
-
VALID_FORMATS_STR
public static final java.lang.String VALID_FORMATS_STR
- See Also:
- Constant Field Values
-
VALID_DATA_FORMATS
public static final java.util.Set<java.lang.String> VALID_DATA_FORMATS
-
OUTPUT_TAG
public static final org.apache.beam.sdk.values.TupleTag<org.apache.beam.sdk.values.Row> OUTPUT_TAG
-
ERROR_TAG
public static final org.apache.beam.sdk.values.TupleTag<org.apache.beam.sdk.values.Row> ERROR_TAG
-
-
Method Detail
-
configurationClass
protected java.lang.Class<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration> configurationClass()
- Overrides:
configurationClassin classorg.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>
-
description
public java.lang.String description()
-
from
public org.apache.beam.sdk.schemas.transforms.SchemaTransform from(PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration configuration)
- Specified by:
fromin classorg.apache.beam.sdk.schemas.transforms.TypedSchemaTransformProvider<PubsubLiteReadSchemaTransformProvider.PubsubLiteReadSchemaTransformConfiguration>
-
buildSchemaWithAttributes
public static org.apache.beam.sdk.schemas.Schema buildSchemaWithAttributes(org.apache.beam.sdk.schemas.Schema schema, java.util.List<java.lang.String> attributes, java.lang.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:
java.lang.IllegalArgumentException- if the schema is null or if any attribute name in the attributes list is null or empty.
-
getRawBytesToRowFunction
public static org.apache.beam.sdk.transforms.SerializableFunction<byte[],org.apache.beam.sdk.values.Row> getRawBytesToRowFunction(org.apache.beam.sdk.schemas.Schema rawSchema)
-
getUuidFromMessage
public static org.apache.beam.sdk.transforms.SerializableFunction<com.google.cloud.pubsublite.proto.SequencedMessage,Uuid> getUuidFromMessage(java.lang.String attributeId)
-
identifier
public java.lang.String identifier()
-
inputCollectionNames
public java.util.List<java.lang.String> inputCollectionNames()
-
outputCollectionNames
public java.util.List<java.lang.String> outputCollectionNames()
-
-