Class CreateTables<DestinationT,ElementT>
- java.lang.Object
-
- org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<DestinationT,ElementT>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<TableDestination,ElementT>>>
-
- org.apache.beam.sdk.io.gcp.bigquery.CreateTables<DestinationT,ElementT>
-
- All Implemented Interfaces:
java.io.Serializable,org.apache.beam.sdk.transforms.display.HasDisplayData
public class CreateTables<DestinationT,ElementT> extends org.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<DestinationT,ElementT>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<TableDestination,ElementT>>>
Creates any tables needed before performing streaming writes to the tables. This is a side-effectDoFn, and returns the original collection unchanged.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CreateTables(BigQueryIO.Write.CreateDisposition createDisposition, DynamicDestinations<?,DestinationT> dynamicDestinations)The list of tables created so far, so we don't try the creation each time.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<TableDestination,ElementT>>expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<DestinationT,ElementT>> input)-
Methods inherited from class org.apache.beam.sdk.transforms.PTransform
addAnnotation, compose, compose, getAdditionalInputs, getAnnotations, getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, getResourceHints, populateDisplayData, setDisplayData, setResourceHints, toString, validate, validate
-
-
-
-
Constructor Detail
-
CreateTables
public CreateTables(BigQueryIO.Write.CreateDisposition createDisposition, DynamicDestinations<?,DestinationT> dynamicDestinations)
The list of tables created so far, so we don't try the creation each time.TODO: We should put a bound on memory usage of this. Use guava cache instead.
-
-
Method Detail
-
expand
public org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<TableDestination,ElementT>> expand(org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<DestinationT,ElementT>> input)
- Specified by:
expandin classorg.apache.beam.sdk.transforms.PTransform<org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<DestinationT,ElementT>>,org.apache.beam.sdk.values.PCollection<org.apache.beam.sdk.values.KV<TableDestination,ElementT>>>
-
-