Class: Google::Apis::BigqueryV2::ConnectionProperty

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/bigquery_v2/classes.rb,
lib/google/apis/bigquery_v2/representations.rb,
lib/google/apis/bigquery_v2/representations.rb

Overview

A connection-level property to customize query behavior. Under JDBC, these correspond directly to connection properties passed to the DriverManager. Under ODBC, these correspond to properties in the connection string. Currently supported connection properties: * dataset_project_id: represents the default project for datasets that are used in the query. Setting the system variable @@dataset_project_id achieves the same behavior. For more information about system variables, see: https://cloud.google.com/bigquery/ docs/reference/system-variables * time_zone: represents the default timezone used to run the query. * session_id: associates the query with a given session. * query_label: associates the query with a given job label. If set, all subsequent queries in a script or session will have this label. For the format in which a you can specify a query label, see labels in the JobConfiguration resource type: https://cloud.google.com/bigquery/docs/ reference/rest/v2/Job#jobconfiguration Additional properties are allowed, but ignored. Specifying multiple connection properties with the same key returns an error.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ ConnectionProperty

Returns a new instance of ConnectionProperty.



1514
1515
1516
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1514

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#keyString

The key of the property to set. Corresponds to the JSON property key

Returns:

  • (String)


1507
1508
1509
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1507

def key
  @key
end

#valueString

The value of the property to set. Corresponds to the JSON property value

Returns:

  • (String)


1512
1513
1514
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1512

def value
  @value
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1519
1520
1521
1522
# File 'lib/google/apis/bigquery_v2/classes.rb', line 1519

def update!(**args)
  @key = args[:key] if args.key?(:key)
  @value = args[:value] if args.key?(:value)
end