Class PortableBigQueryDestinations
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigquery.DynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
-
- org.apache.beam.sdk.io.gcp.bigquery.providers.PortableBigQueryDestinations
-
- All Implemented Interfaces:
java.io.Serializable
@Internal public class PortableBigQueryDestinations extends DynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDESTINATIONstatic java.lang.StringRECORD
-
Constructor Summary
Constructors Constructor Description PortableBigQueryDestinations(org.apache.beam.sdk.schemas.Schema rowSchema, BigQueryWriteConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.transforms.SerializableFunction<AvroWriteRequest<org.apache.beam.sdk.values.Row>,org.apache.avro.generic.GenericRecord>getAvroFilterFormatFunction(boolean fetchNestedRecord)java.lang.StringgetDestination(@Nullable org.apache.beam.sdk.values.ValueInSingleWindow<org.apache.beam.sdk.values.Row> element)Returns an object that represents at a high level which table is being written to.org.apache.beam.sdk.transforms.SerializableFunction<org.apache.beam.sdk.values.Row,com.google.api.services.bigquery.model.TableRow>getFilterFormatFunction(boolean fetchNestedRecord)@Nullable com.google.api.services.bigquery.model.TableSchemagetSchema(java.lang.String destination)Returns the table schema for the destination.TableDestinationgetTable(java.lang.String destination)Returns aTableDestinationobject for the destination.@Nullable com.google.api.services.bigquery.model.TableConstraintsgetTableConstraints(java.lang.String destination)Returns TableConstraints (including primary and foreign key) to be used when creating the table.-
Methods inherited from class org.apache.beam.sdk.io.gcp.bigquery.DynamicDestinations
getDestinationCoder, getSideInputs, sideInput
-
-
-
-
Field Detail
-
DESTINATION
public static final java.lang.String DESTINATION
- See Also:
- Constant Field Values
-
RECORD
public static final java.lang.String RECORD
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PortableBigQueryDestinations
public PortableBigQueryDestinations(org.apache.beam.sdk.schemas.Schema rowSchema, BigQueryWriteConfiguration configuration)
-
-
Method Detail
-
getDestination
public java.lang.String getDestination(@Nullable org.apache.beam.sdk.values.ValueInSingleWindow<org.apache.beam.sdk.values.Row> element)
Description copied from class:DynamicDestinationsReturns an object that represents at a high level which table is being written to. May not return null.The method must return a unique object for different destination tables involved over all BigQueryIO write transforms in the same pipeline. See https://github.com/apache/beam/issues/32335 for details.
- Specified by:
getDestinationin classDynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
-
getTable
public TableDestination getTable(java.lang.String destination)
Description copied from class:DynamicDestinationsReturns aTableDestinationobject for the destination. May not return null. Return value needs to be unique to each destination: may not return the sameTableDestinationfor different destinations.- Specified by:
getTablein classDynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
-
getSchema
public @Nullable com.google.api.services.bigquery.model.TableSchema getSchema(java.lang.String destination)
Description copied from class:DynamicDestinationsReturns the table schema for the destination.- Specified by:
getSchemain classDynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
-
getTableConstraints
public @Nullable com.google.api.services.bigquery.model.TableConstraints getTableConstraints(java.lang.String destination)
Description copied from class:DynamicDestinationsReturns TableConstraints (including primary and foreign key) to be used when creating the table. Note: this is not currently supported when using FILE_LOADS!.- Overrides:
getTableConstraintsin classDynamicDestinations<org.apache.beam.sdk.values.Row,java.lang.String>
-
getFilterFormatFunction
public org.apache.beam.sdk.transforms.SerializableFunction<org.apache.beam.sdk.values.Row,com.google.api.services.bigquery.model.TableRow> getFilterFormatFunction(boolean fetchNestedRecord)
-
getAvroFilterFormatFunction
public org.apache.beam.sdk.transforms.SerializableFunction<AvroWriteRequest<org.apache.beam.sdk.values.Row>,org.apache.avro.generic.GenericRecord> getAvroFilterFormatFunction(boolean fetchNestedRecord)
-
-