com.google.cloud.dataflow.examples.complete.game.utils

## Class WriteToBigQuery<T>

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.PTransform<PCollection<T>,PDone>
  - - com.google.cloud.dataflow.examples.complete.game.utils.WriteToBigQuery<T>

All Implemented Interfaces:
  HasDisplayData, Serializable

Direct Known Subclasses:
  WriteWindowedToBigQuery

    public class WriteToBigQuery<T>
    extends PTransform<PCollection<T>,PDone>

Generate, format, and write BigQuery table row information. Use provided information about the field names and types, as well as lambda functions that describe how to generate their values.

See Also:
  Serialized Form

### Nested Class Summary

Nested Classes
`protected class` `WriteToBigQuery.BuildRowFn` Convert each key/score pair into a BigQuery TableRow as specified by fieldFn.
`static class` `WriteToBigQuery.FieldInfo<T>` Define a class to hold information about output table field definitions.

### Field Summary

Fields
`protected Map<String,WriteToBigQuery.FieldInfo<T>>` `fieldInfo`
`protected String` `tableName`

### Fields inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`name`

### Constructor Summary

Constructors
Constructor and Description
`WriteToBigQuery()`
`WriteToBigQuery(String tableName, Map<String,WriteToBigQuery.FieldInfo<T>> fieldInfo)`

### Method Summary

All Methods Instance Methods Concrete Methods
`PDone` `apply(PCollection<T> teamAndScore)`
`protected TableSchema` `getSchema()` Build the output table schema.

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.PTransform

`getDefaultOutputCoder, getDefaultOutputCoder, getDefaultOutputCoder, getKindString, getName, populateDisplayData, toString, validate`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### tableName

    protected String tableName

#### fieldInfo

    protected Map<String,WriteToBigQuery.FieldInfo<T>> fieldInfo

### Constructor Detail

#### WriteToBigQuery

    public WriteToBigQuery()

#### WriteToBigQuery

    public WriteToBigQuery(String tableName,
                           Map<String,WriteToBigQuery.FieldInfo<T>> fieldInfo)

### Method Detail

#### getSchema

    protected TableSchema getSchema()

Build the output table schema.

#### apply

    public PDone apply(PCollection<T> teamAndScore)

Overrides:
  `apply` in class `PTransform<PCollection<T>,PDone>`