Class UpdateSchemaDestination<DestinationT>

java.lang.Object
org.apache.beam.sdk.transforms.DoFn<Iterable<KV<DestinationT,org.apache.beam.sdk.io.gcp.bigquery.WriteTables.Result>>,Iterable<KV<TableDestination,org.apache.beam.sdk.io.gcp.bigquery.WriteTables.Result>>>
org.apache.beam.sdk.io.gcp.bigquery.UpdateSchemaDestination<DestinationT>
All Implemented Interfaces:
Serializable, HasDisplayData

public class UpdateSchemaDestination<DestinationT> extends DoFn<Iterable<KV<DestinationT,org.apache.beam.sdk.io.gcp.bigquery.WriteTables.Result>>,Iterable<KV<TableDestination,org.apache.beam.sdk.io.gcp.bigquery.WriteTables.Result>>>
Update destination schema based on data that is about to be copied into it.

Unlike load and query jobs, BigQuery copy jobs do not support schema field addition or relaxation on the destination table. This DoFn fills that gap by updating the destination table schemas to be compatible with the data coming from the source table so that schemaUpdateOptions are respected regardless of whether data is loaded directly to the destination table or loaded into temporary tables before being copied into the destination.

This transform takes as input a list of KV(destination, WriteTables.Result) and emits a list of KV(TableDestination, WriteTables.Result) where the destination label is parsed and replaced to TableDestination objects.

See Also: