Google BigQuery Storage V1 Client - Class WriteStream (1.10.3)

Reference documentation and code samples for the Google BigQuery Storage V1 Client class WriteStream.

Information about a single stream that gets data inside the storage system.

Generated from protobuf message google.cloud.bigquery.storage.v1.WriteStream

Namespace

Google \ Cloud \ BigQuery \ Storage \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Name of the stream, in the form projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}.

↳ type int

Immutable. Type of the stream.

↳ create_time Google\Protobuf\Timestamp

Output only. Create time of the stream. For the _default stream, this is the creation_time of the table.

↳ commit_time Google\Protobuf\Timestamp

Output only. Commit time of the stream. If a stream is of COMMITTED type, then it will have a commit_time same as create_time. If the stream is of PENDING type, empty commit_time means it is not committed.

↳ table_schema Google\Cloud\BigQuery\Storage\V1\TableSchema

Output only. The schema of the destination table. It is only returned in CreateWriteStream response. Caller should generate data that's compatible with this schema to send in initial AppendRowsRequest. The table schema could go out of date during the life time of the stream.

↳ write_mode int

Immutable. Mode of the stream.

↳ location string

Immutable. The geographic location where the stream's dataset resides. See https://cloud.google.com/bigquery/docs/locations for supported locations.

getName

Output only. Name of the stream, in the form projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}.

Returns
Type Description
string

setName

Output only. Name of the stream, in the form projects/{project}/datasets/{dataset}/tables/{table}/streams/{stream}.

Parameter
Name Description
var string
Returns
Type Description
$this

getType

Immutable. Type of the stream.

Returns
Type Description
int

setType

Immutable. Type of the stream.

Parameter
Name Description
var int
Returns
Type Description
$this

getCreateTime

Output only. Create time of the stream. For the _default stream, this is the creation_time of the table.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCreateTime

clearCreateTime

setCreateTime

Output only. Create time of the stream. For the _default stream, this is the creation_time of the table.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getCommitTime

Output only. Commit time of the stream.

If a stream is of COMMITTED type, then it will have a commit_time same as create_time. If the stream is of PENDING type, empty commit_time means it is not committed.

Returns
Type Description
Google\Protobuf\Timestamp|null

hasCommitTime

clearCommitTime

setCommitTime

Output only. Commit time of the stream.

If a stream is of COMMITTED type, then it will have a commit_time same as create_time. If the stream is of PENDING type, empty commit_time means it is not committed.

Parameter
Name Description
var Google\Protobuf\Timestamp
Returns
Type Description
$this

getTableSchema

Output only. The schema of the destination table. It is only returned in CreateWriteStream response. Caller should generate data that's compatible with this schema to send in initial AppendRowsRequest.

The table schema could go out of date during the life time of the stream.

Returns
Type Description
Google\Cloud\BigQuery\Storage\V1\TableSchema|null

hasTableSchema

clearTableSchema

setTableSchema

Output only. The schema of the destination table. It is only returned in CreateWriteStream response. Caller should generate data that's compatible with this schema to send in initial AppendRowsRequest.

The table schema could go out of date during the life time of the stream.

Parameter
Name Description
var Google\Cloud\BigQuery\Storage\V1\TableSchema
Returns
Type Description
$this

getWriteMode

Immutable. Mode of the stream.

Returns
Type Description
int

setWriteMode

Immutable. Mode of the stream.

Parameter
Name Description
var int
Returns
Type Description
$this

getLocation

Immutable. The geographic location where the stream's dataset resides. See https://cloud.google.com/bigquery/docs/locations for supported locations.

Returns
Type Description
string

setLocation

Immutable. The geographic location where the stream's dataset resides. See https://cloud.google.com/bigquery/docs/locations for supported locations.

Parameter
Name Description
var string
Returns
Type Description
$this