Google BigQuery Connection V1 Client - Class CloudSpannerProperties (2.0.0)

Reference documentation and code samples for the Google BigQuery Connection V1 Client class CloudSpannerProperties.

Connection properties specific to Cloud Spanner.

Generated from protobuf message google.cloud.bigquery.connection.v1.CloudSpannerProperties

Namespace

Google \ Cloud \ BigQuery \ Connection \ V1

Methods

__construct

Constructor.

Parameters
Name Description
data array

Optional. Data for populating the Message object.

↳ database string

Cloud Spanner database in the form `project/instance/database'

↳ use_parallelism bool

If parallelism should be used when reading from Cloud Spanner

↳ max_parallelism int

Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration. REQUIRES: use_parallelism must be set. REQUIRES: Either use_data_boost or use_serverless_analytics must be set.

↳ use_serverless_analytics bool

If the serverless analytics service should be used to read data from Cloud Spanner. Note: use_parallelism must be set when using serverless analytics.

↳ use_data_boost bool

If set, the request will be executed via Spanner independent compute resources. REQUIRES: use_parallelism must be set. NOTE: use_serverless_analytics will be deprecated. Prefer use_data_boost over use_serverless_analytics.

↳ database_role string

Optional. Cloud Spanner database role for fine-grained access control. The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. For more details, see About fine-grained access control. REQUIRES: The database role name must start with a letter, and can only contain letters, numbers, and underscores.

getDatabase

Cloud Spanner database in the form `project/instance/database'

Returns
Type Description
string

setDatabase

Cloud Spanner database in the form `project/instance/database'

Parameter
Name Description
var string
Returns
Type Description
$this

getUseParallelism

If parallelism should be used when reading from Cloud Spanner

Returns
Type Description
bool

setUseParallelism

If parallelism should be used when reading from Cloud Spanner

Parameter
Name Description
var bool
Returns
Type Description
$this

getMaxParallelism

Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration.

REQUIRES: use_parallelism must be set. REQUIRES: Either use_data_boost or use_serverless_analytics must be set.

Returns
Type Description
int

setMaxParallelism

Allows setting max parallelism per query when executing on Spanner independent compute resources. If unspecified, default values of parallelism are chosen that are dependent on the Cloud Spanner instance configuration.

REQUIRES: use_parallelism must be set. REQUIRES: Either use_data_boost or use_serverless_analytics must be set.

Parameter
Name Description
var int
Returns
Type Description
$this

getUseServerlessAnalytics

If the serverless analytics service should be used to read data from Cloud Spanner.

Note: use_parallelism must be set when using serverless analytics.

Returns
Type Description
bool

setUseServerlessAnalytics

If the serverless analytics service should be used to read data from Cloud Spanner.

Note: use_parallelism must be set when using serverless analytics.

Parameter
Name Description
var bool
Returns
Type Description
$this

getUseDataBoost

If set, the request will be executed via Spanner independent compute resources.

REQUIRES: use_parallelism must be set. NOTE: use_serverless_analytics will be deprecated. Prefer use_data_boost over use_serverless_analytics.

Returns
Type Description
bool

setUseDataBoost

If set, the request will be executed via Spanner independent compute resources.

REQUIRES: use_parallelism must be set. NOTE: use_serverless_analytics will be deprecated. Prefer use_data_boost over use_serverless_analytics.

Parameter
Name Description
var bool
Returns
Type Description
$this

getDatabaseRole

Optional. Cloud Spanner database role for fine-grained access control.

The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. For more details, see About fine-grained access control. REQUIRES: The database role name must start with a letter, and can only contain letters, numbers, and underscores.

Returns
Type Description
string

setDatabaseRole

Optional. Cloud Spanner database role for fine-grained access control.

The Cloud Spanner admin should have provisioned the database role with appropriate permissions, such as SELECT and INSERT. Other users should only use roles provided by their Cloud Spanner admins. For more details, see About fine-grained access control. REQUIRES: The database role name must start with a letter, and can only contain letters, numbers, and underscores.

Parameter
Name Description
var string
Returns
Type Description
$this