Google BigQuery Storage V1 Client - Class ReadSession (1.8.0)

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

Information about the ReadSession.

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

Namespace

Google \ Cloud \ BigQuery \ Storage \ V1

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ name string

Output only. Unique identifier for the session, in the form projects/{project_id}/locations/{location}/sessions/{session_id}.

↳ expire_time Google\Protobuf\Timestamp

Output only. Time at which the session becomes invalid. After this time, subsequent requests to read this Session will return errors. The expire_time is automatically assigned and currently cannot be specified or updated.

↳ data_format int

Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.

↳ avro_schema Google\Cloud\BigQuery\Storage\V1\AvroSchema

Output only. Avro schema.

↳ arrow_schema Google\Cloud\BigQuery\Storage\V1\ArrowSchema

Output only. Arrow schema.

↳ table string

Immutable. Table that this ReadSession is reading from, in the form projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

↳ table_modifiers Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers

Optional. Any modifiers which are applied when reading from the specified table.

↳ read_options Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions

Optional. Read options for this session (e.g. column selection, filters).

↳ streams array<Google\Cloud\BigQuery\Storage\V1\ReadStream>

Output only. A list of streams created with the session. At least one stream is created with the session. In the future, larger request_stream_count values may result in this list being unpopulated, in that case, the user will need to use a List method to get the streams instead, which is not yet available.

↳ estimated_total_bytes_scanned int|string

Output only. An estimate on the number of bytes this session will scan when all streams are completely consumed. This estimate is based on metadata from the table which might be incomplete or stale.

↳ estimated_total_physical_file_size int|string

Output only. A pre-projected estimate of the total physical size of files (in bytes) that this session will scan when all streams are consumed. This estimate is independent of the selected columns and can be based on incomplete or stale metadata from the table. This field is only set for BigLake tables.

↳ estimated_row_count int|string

Output only. An estimate on the number of rows present in this session's streams. This estimate is based on metadata from the table which might be incomplete or stale.

↳ trace_id string

Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable). Maximum length is 256 bytes.

getName

Output only. Unique identifier for the session, in the form projects/{project_id}/locations/{location}/sessions/{session_id}.

Returns
TypeDescription
string

setName

Output only. Unique identifier for the session, in the form projects/{project_id}/locations/{location}/sessions/{session_id}.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getExpireTime

Output only. Time at which the session becomes invalid. After this time, subsequent requests to read this Session will return errors. The expire_time is automatically assigned and currently cannot be specified or updated.

Returns
TypeDescription
Google\Protobuf\Timestamp|null

hasExpireTime

clearExpireTime

setExpireTime

Output only. Time at which the session becomes invalid. After this time, subsequent requests to read this Session will return errors. The expire_time is automatically assigned and currently cannot be specified or updated.

Parameter
NameDescription
var Google\Protobuf\Timestamp
Returns
TypeDescription
$this

getDataFormat

Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.

Returns
TypeDescription
int

setDataFormat

Immutable. Data format of the output data. DATA_FORMAT_UNSPECIFIED not supported.

Parameter
NameDescription
var int
Returns
TypeDescription
$this

getAvroSchema

Output only. Avro schema.

Returns
TypeDescription
Google\Cloud\BigQuery\Storage\V1\AvroSchema|null

hasAvroSchema

setAvroSchema

Output only. Avro schema.

Parameter
NameDescription
var Google\Cloud\BigQuery\Storage\V1\AvroSchema
Returns
TypeDescription
$this

getArrowSchema

Output only. Arrow schema.

Returns
TypeDescription
Google\Cloud\BigQuery\Storage\V1\ArrowSchema|null

hasArrowSchema

setArrowSchema

Output only. Arrow schema.

Parameter
NameDescription
var Google\Cloud\BigQuery\Storage\V1\ArrowSchema
Returns
TypeDescription
$this

getTable

Immutable. Table that this ReadSession is reading from, in the form projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

Returns
TypeDescription
string

setTable

Immutable. Table that this ReadSession is reading from, in the form projects/{project_id}/datasets/{dataset_id}/tables/{table_id}

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getTableModifiers

Optional. Any modifiers which are applied when reading from the specified table.

Returns
TypeDescription
Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers|null

hasTableModifiers

clearTableModifiers

setTableModifiers

Optional. Any modifiers which are applied when reading from the specified table.

Parameter
NameDescription
var Google\Cloud\BigQuery\Storage\V1\ReadSession\TableModifiers
Returns
TypeDescription
$this

getReadOptions

Optional. Read options for this session (e.g. column selection, filters).

Returns
TypeDescription
Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions|null

hasReadOptions

clearReadOptions

setReadOptions

Optional. Read options for this session (e.g. column selection, filters).

Parameter
NameDescription
var Google\Cloud\BigQuery\Storage\V1\ReadSession\TableReadOptions
Returns
TypeDescription
$this

getStreams

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger request_stream_count values may result in this list being unpopulated, in that case, the user will need to use a List method to get the streams instead, which is not yet available.

Returns
TypeDescription
Google\Protobuf\Internal\RepeatedField

setStreams

Output only. A list of streams created with the session.

At least one stream is created with the session. In the future, larger request_stream_count values may result in this list being unpopulated, in that case, the user will need to use a List method to get the streams instead, which is not yet available.

Parameter
NameDescription
var array<Google\Cloud\BigQuery\Storage\V1\ReadStream>
Returns
TypeDescription
$this

getEstimatedTotalBytesScanned

Output only. An estimate on the number of bytes this session will scan when all streams are completely consumed. This estimate is based on metadata from the table which might be incomplete or stale.

Returns
TypeDescription
int|string

setEstimatedTotalBytesScanned

Output only. An estimate on the number of bytes this session will scan when all streams are completely consumed. This estimate is based on metadata from the table which might be incomplete or stale.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getEstimatedTotalPhysicalFileSize

Output only. A pre-projected estimate of the total physical size of files (in bytes) that this session will scan when all streams are consumed. This estimate is independent of the selected columns and can be based on incomplete or stale metadata from the table. This field is only set for BigLake tables.

Returns
TypeDescription
int|string

setEstimatedTotalPhysicalFileSize

Output only. A pre-projected estimate of the total physical size of files (in bytes) that this session will scan when all streams are consumed. This estimate is independent of the selected columns and can be based on incomplete or stale metadata from the table. This field is only set for BigLake tables.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getEstimatedRowCount

Output only. An estimate on the number of rows present in this session's streams. This estimate is based on metadata from the table which might be incomplete or stale.

Returns
TypeDescription
int|string

setEstimatedRowCount

Output only. An estimate on the number of rows present in this session's streams. This estimate is based on metadata from the table which might be incomplete or stale.

Parameter
NameDescription
var int|string
Returns
TypeDescription
$this

getTraceId

Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable).

Maximum length is 256 bytes.

Returns
TypeDescription
string

setTraceId

Optional. ID set by client to annotate a session identity. This does not need to be strictly unique, but instead the same ID should be used to group logically connected sessions (e.g. All using the same ID for all sessions needed to complete a Spark SQL query is reasonable).

Maximum length is 256 bytes.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getSchema

Returns
TypeDescription
string