public class TableDataWriteChannel extends BaseWriteChannel<BigQueryOptions,WriteChannelConfiguration>
WriteChannel
implementation to stream data into a BigQuery table. Use getJob()
to get the job used to insert streamed data. Please notice that getJob()
returns null
until the channel is closed.BaseWriteChannel.BaseState<ServiceOptionsT extends ServiceOptions<?,ServiceOptionsT>,EntityT extends Serializable>
Modifier and Type | Method and Description |
---|---|
protected void |
flushBuffer(int length,
boolean last)
|
Job |
getJob()
Returns the
Job created to insert the rows. |
protected com.google.cloud.bigquery.TableDataWriteChannel.StateImpl.Builder |
stateBuilder()
Creates a
BaseWriteChannel.BaseState.Builder for the current write channel. |
capture, close, getBuffer, getChunkSize, getDefaultChunkSize, getEntity, getLimit, getMinChunkSize, getOptions, getPosition, getUploadId, isOpen, restore, setChunkSize, write
protected void flushBuffer(int length, boolean last)
BaseWriteChannel
flushBuffer
in class BaseWriteChannel<BigQueryOptions,WriteChannelConfiguration>
length
- the number of bytes to write from BaseWriteChannel.getBuffer()
last
- if true
the resumable session is closedprotected com.google.cloud.bigquery.TableDataWriteChannel.StateImpl.Builder stateBuilder()
BaseWriteChannel
BaseWriteChannel.BaseState.Builder
for the current write channel.stateBuilder
in class BaseWriteChannel<BigQueryOptions,WriteChannelConfiguration>
public Job getJob()
Job
created to insert the rows. The job is available only once the upload
finished and the channel was closed, returns null
otherwise.Copyright © 2019 Google LLC. All rights reserved.