@Internal public class PortableBigQueryDestinations extends DynamicDestinations<Row,java.lang.String>
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DESTINATION |
static java.lang.String |
RECORD |
Constructor and Description |
---|
PortableBigQueryDestinations(Schema rowSchema,
BigQueryWriteConfiguration configuration) |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getDestination(@Nullable ValueInSingleWindow<Row> element)
Returns an object that represents at a high level which table is being written to.
|
SerializableFunction<Row,TableRow> |
getFilterFormatFunction(boolean fetchNestedRecord) |
@Nullable TableSchema |
getSchema(java.lang.String destination)
Returns the table schema for the destination.
|
TableDestination |
getTable(java.lang.String destination)
Returns a
TableDestination object for the destination. |
@Nullable TableConstraints |
getTableConstraints(java.lang.String destination)
Returns TableConstraints (including primary and foreign key) to be used when creating the
table.
|
getDestinationCoder, getSideInputs, sideInput
public static final java.lang.String DESTINATION
public static final java.lang.String RECORD
public PortableBigQueryDestinations(Schema rowSchema, BigQueryWriteConfiguration configuration)
public java.lang.String getDestination(@Nullable ValueInSingleWindow<Row> 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<Row,java.lang.String>
public TableDestination getTable(java.lang.String 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<Row,java.lang.String>
public @Nullable TableSchema getSchema(java.lang.String destination)
DynamicDestinations
getSchema
in class DynamicDestinations<Row,java.lang.String>
public @Nullable TableConstraints getTableConstraints(java.lang.String destination)
DynamicDestinations
getTableConstraints
in class DynamicDestinations<Row,java.lang.String>
public SerializableFunction<Row,TableRow> getFilterFormatFunction(boolean fetchNestedRecord)