public class StorageApiDynamicDestinationsTableRow<T,DestinationT> extends DynamicDestinations<T,DestinationT>
Modifier and Type | Class and Description |
---|---|
static interface |
org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinations.MessageConverter<T> |
Modifier and Type | Method and Description |
---|---|
DestinationT |
getDestination(@Nullable ValueInSingleWindow<T> element)
Returns an object that represents at a high level which table is being written to.
|
@Nullable Coder<DestinationT> |
getDestinationCoder()
Returns the coder for
DestinationT . |
org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinations.MessageConverter<T> |
getMessageConverter(DestinationT destination,
BigQueryServices.DatasetService datasetService) |
@Nullable TableSchema |
getSchema(DestinationT destination)
Returns the table schema for the destination.
|
java.util.List<PCollectionView<?>> |
getSideInputs()
Specifies that this object needs access to one or more side inputs.
|
TableDestination |
getTable(DestinationT destination)
Returns a
TableDestination object for the destination. |
@Nullable TableConstraints |
getTableConstraints(DestinationT destination)
Returns TableConstraints (including primary and foreign key) to be used when creating the
table.
|
java.lang.String |
toString() |
sideInput
public org.apache.beam.sdk.io.gcp.bigquery.StorageApiDynamicDestinations.MessageConverter<T> getMessageConverter(DestinationT destination, BigQueryServices.DatasetService datasetService) throws java.lang.Exception
java.lang.Exception
public DestinationT getDestination(@Nullable ValueInSingleWindow<T> element)
DynamicDestinations
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.
getDestination
in class DynamicDestinations<T,DestinationT>
public @Nullable TableSchema getSchema(DestinationT destination)
DynamicDestinations
getSchema
in class DynamicDestinations<T,DestinationT>
public @Nullable TableConstraints getTableConstraints(DestinationT destination)
DynamicDestinations
getTableConstraints
in class DynamicDestinations<T,DestinationT>
public TableDestination getTable(DestinationT destination)
DynamicDestinations
TableDestination
object for the destination. May not return null. Return
value needs to be unique to each destination: may not return the same TableDestination
for different destinations.getTable
in class DynamicDestinations<T,DestinationT>
public @Nullable Coder<DestinationT> getDestinationCoder()
DynamicDestinations
DestinationT
. If this is not overridden, then BigQueryIO
will look in the coder registry for a suitable coder. This must be a deterministic coder, as
DestinationT
will be used as a key type in a GroupByKey
.getDestinationCoder
in class DynamicDestinations<T,DestinationT>
public java.util.List<PCollectionView<?>> getSideInputs()
DynamicDestinations
getSideInputs
in class DynamicDestinations<T,DestinationT>
public java.lang.String toString()
toString
in class java.lang.Object