public class BigQueryReader extends Reader<WindowedValue<com.google.api.services.bigquery.model.TableRow>>
The source is a wrapper over the BigQueryTableRowIterator class, which issues a
query for all rows of a table and then iterates over the result. There is no support for
progress reporting because the source is used only in situations where the entire table must be
read by each worker (i.e. the source is used as a side input).
Reader.AbstractReaderIterator<T>, Reader.DynamicSplitRequest, Reader.DynamicSplitResult, Reader.DynamicSplitResultWithPosition, Reader.Position, Reader.Progress, Reader.ReaderIterator<T>stateSampler, stateSamplerOperationName| Constructor and Description |
|---|
BigQueryReader(BigQueryOptions bigQueryOptions,
String query,
String projectId) |
BigQueryReader(BigQueryOptions bigQueryOptions,
com.google.api.services.bigquery.model.TableReference tableRef)
Builds a BigQuery source using pipeline options to instantiate a Bigquery client.
|
BigQueryReader(com.google.api.services.bigquery.Bigquery bigQueryClient,
String query,
String projectId) |
BigQueryReader(com.google.api.services.bigquery.Bigquery bigQueryClient,
com.google.api.services.bigquery.model.TableReference tableRef)
Builds a BigQueryReader directly using a BigQuery client.
|
| Modifier and Type | Method and Description |
|---|---|
Reader.ReaderIterator<WindowedValue<com.google.api.services.bigquery.model.TableRow>> |
iterator()
Returns a ReaderIterator that allows reading from this source.
|
notifyElementRead, setStateSamplerAndOperationName, supportsRestartaddObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChangedpublic BigQueryReader(BigQueryOptions bigQueryOptions, com.google.api.services.bigquery.model.TableReference tableRef)
public BigQueryReader(BigQueryOptions bigQueryOptions, String query, String projectId)
public BigQueryReader(com.google.api.services.bigquery.Bigquery bigQueryClient,
com.google.api.services.bigquery.model.TableReference tableRef)
public Reader.ReaderIterator<WindowedValue<com.google.api.services.bigquery.model.TableRow>> iterator() throws IOException
Readeriterator in class Reader<WindowedValue<com.google.api.services.bigquery.model.TableRow>>IOException