Class StorageApiDynamicDestinationsTableRow<T,DestinationT extends @NonNull java.lang.Object>
- java.lang.Object
-
- org.apache.beam.sdk.io.gcp.bigquery.DynamicDestinations<T,DestinationT>
-
- org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinationsTableRow<T,DestinationT>
-
- All Implemented Interfaces:
java.io.Serializable
public class StorageApiDynamicDestinationsTableRow<T,DestinationT extends @NonNull java.lang.Object> extends DynamicDestinations<T,DestinationT>
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DestinationTgetDestination(@Nullable org.apache.beam.sdk.values.ValueInSingleWindow<T> element)Returns an object that represents at a high level which table is being written to.@Nullable org.apache.beam.sdk.coders.Coder<DestinationT>getDestinationCoder()Returns the coder forDynamicDestinations.org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinations.MessageConverter<T>getMessageConverter(DestinationT destination, BigQueryServices.DatasetService datasetService)@Nullable com.google.api.services.bigquery.model.TableSchemagetSchema(DestinationT destination)Returns the table schema for the destination.java.util.List<org.apache.beam.sdk.values.PCollectionView<?>>getSideInputs()Specifies that this object needs access to one or more side inputs.TableDestinationgetTable(DestinationT destination)Returns aTableDestinationobject for the destination.@Nullable com.google.api.services.bigquery.model.TableConstraintsgetTableConstraints(DestinationT destination)Returns TableConstraints (including primary and foreign key) to be used when creating the table.java.lang.StringtoString()-
Methods inherited from class org.apache.beam.sdk.io.gcp.bigquery.DynamicDestinations
sideInput
-
-
-
-
Method Detail
-
getMessageConverter
public org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinations.MessageConverter<T> getMessageConverter(DestinationT destination, BigQueryServices.DatasetService datasetService) throws java.lang.Exception
- Throws:
java.lang.Exception
-
getDestination
public DestinationT getDestination(@Nullable org.apache.beam.sdk.values.ValueInSingleWindow<T> 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<T,DestinationT>
-
getSchema
public @Nullable com.google.api.services.bigquery.model.TableSchema getSchema(DestinationT destination)
Description copied from class:DynamicDestinationsReturns the table schema for the destination.- Specified by:
getSchemain classDynamicDestinations<T,DestinationT>
-
getTableConstraints
public @Nullable com.google.api.services.bigquery.model.TableConstraints getTableConstraints(DestinationT 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<T,DestinationT>
-
getTable
public TableDestination getTable(DestinationT 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<T,DestinationT>
-
getDestinationCoder
public @Nullable org.apache.beam.sdk.coders.Coder<DestinationT> getDestinationCoder()
Description copied from class:DynamicDestinationsReturns the coder forDynamicDestinations. If this is not overridden, thenBigQueryIOwill look in the coder registry for a suitable coder. This must be a deterministic coder, asDynamicDestinationswill be used as a key type in aGroupByKey.- Overrides:
getDestinationCoderin classDynamicDestinations<T,DestinationT>
-
getSideInputs
public java.util.List<org.apache.beam.sdk.values.PCollectionView<?>> getSideInputs()
Description copied from class:DynamicDestinationsSpecifies that this object needs access to one or more side inputs. This side inputs must be globally windowed, as they will be accessed from the global window.- Overrides:
getSideInputsin classDynamicDestinations<T,DestinationT>
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-