Google BigQuery Storage V1 Client - Class WriteStream (1.7.1)

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
NameDescription
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
TypeDescription
string

setName

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getType

Immutable. Type of the stream.

Returns
TypeDescription
int

setType

Immutable. Type of the stream.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getCreateTime

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

Returns
TypeDescription
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
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$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
TypeDescription
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
NameDescription
var Google\Cloud\BigQuery\Storage\V1\TableSchema
Returns
TypeDescription
$this

getWriteMode

Immutable. Mode of the stream.

Returns
TypeDescription
int

setWriteMode

Immutable. Mode of the stream.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getLocation

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

Returns
TypeDescription
string

setLocation

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

Parameter
NameDescription
var string
Returns
TypeDescription
$this