Class: Google::Apis::BigqueryV2::BigqueryService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
generated/google/apis/bigquery_v2/service.rb

Overview

BigQuery API

A data platform for customers to create, manage, share and query data.

Examples:

require 'google/apis/bigquery_v2'

Bigquery = Google::Apis::BigqueryV2 # Alias the module
service = Bigquery::BigqueryService.new

See Also:

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBigqueryService

Returns a new instance of BigqueryService.



49
50
51
52
# File 'generated/google/apis/bigquery_v2/service.rb', line 49

def initialize
  super('https://bigquery.googleapis.com/', 'bigquery/v2/')
  @batch_path = 'batch/bigquery/v2'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



38
39
40
# File 'generated/google/apis/bigquery_v2/service.rb', line 38

def key
  @key
end

#quota_userString

Returns An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

Returns:

  • (String)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.



43
44
45
# File 'generated/google/apis/bigquery_v2/service.rb', line 43

def quota_user
  @quota_user
end

#user_ipString

Returns Deprecated. Please use quotaUser instead.

Returns:

  • (String)

    Deprecated. Please use quotaUser instead.



47
48
49
# File 'generated/google/apis/bigquery_v2/service.rb', line 47

def user_ip
  @user_ip
end

Instance Method Details

#cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::CancelJobResponse

Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.

Parameters:

  • project_id (String)

    [Required] Project ID of the job to cancel

  • job_id (String)

    [Required] Job ID of the job to cancel

  • location (String) (defaults to: nil)

    The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



328
329
330
331
332
333
334
335
336
337
338
339
# File 'generated/google/apis/bigquery_v2/service.rb', line 328

def cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{projectId}/jobs/{jobId}/cancel', options)
  command.response_representation = Google::Apis::BigqueryV2::CancelJobResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::CancelJobResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['location'] = location unless location.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.

Parameters:

  • project_id (String)

    Project ID of the dataset being deleted

  • dataset_id (String)

    Dataset ID of dataset being deleted

  • delete_contents (Boolean) (defaults to: nil)

    If True, delete all the tables in the dataset. If False and the dataset contains tables, the request will fail. Default is False

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



84
85
86
87
88
89
90
91
92
93
# File 'generated/google/apis/bigquery_v2/service.rb', line 84

def delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'projects/{projectId}/datasets/{datasetId}', options)
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['deleteContents'] = delete_contents unless delete_contents.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes the model specified by modelId from the dataset.

Parameters:

  • project_id (String)

    Required. Project ID of the model to delete.

  • dataset_id (String)

    Required. Dataset ID of the model to delete.

  • model_id (String)

    Required. Model ID of the model to delete.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



610
611
612
613
614
615
616
617
618
619
# File 'generated/google/apis/bigquery_v2/service.rb', line 610

def delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['modelId'] = model_id unless model_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_routine(project_id, dataset_id, routine_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes the routine specified by routineId from the dataset.

Parameters:

  • project_id (String)

    Required. Project ID of the routine to delete

  • dataset_id (String)

    Required. Dataset ID of the routine to delete

  • routine_id (String)

    Required. Routine ID of the routine to delete

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



841
842
843
844
845
846
847
848
849
850
# File 'generated/google/apis/bigquery_v2/service.rb', line 841

def delete_routine(project_id, dataset_id, routine_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}', options)
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['routineId'] = routine_id unless routine_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.

Parameters:

  • project_id (String)

    Project ID of the table to delete

  • dataset_id (String)

    Dataset ID of the table to delete

  • table_id (String)

    Table ID of the table to delete

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

  • result (NilClass)

    No result returned for this method

  • err (StandardError)

    error object if request failed

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
# File 'generated/google/apis/bigquery_v2/service.rb', line 1200

def delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:delete, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', options)
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset

Returns the dataset specified by datasetID.

Parameters:

  • project_id (String)

    Project ID of the requested dataset

  • dataset_id (String)

    Dataset ID of the requested dataset

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



119
120
121
122
123
124
125
126
127
128
129
# File 'generated/google/apis/bigquery_v2/service.rb', line 119

def get_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}', options)
  command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.response_class = Google::Apis::BigqueryV2::Dataset
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job

Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.

Parameters:

  • project_id (String)

    [Required] Project ID of the requested job

  • job_id (String)

    [Required] Job ID of the requested job

  • location (String) (defaults to: nil)

    The geographic location of the job. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations#specifying_your_location.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



370
371
372
373
374
375
376
377
378
379
380
381
# File 'generated/google/apis/bigquery_v2/service.rb', line 370

def get_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/jobs/{jobId}', options)
  command.response_representation = Google::Apis::BigqueryV2::Job::Representation
  command.response_class = Google::Apis::BigqueryV2::Job
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['location'] = location unless location.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_job_query_results(project_id, job_id, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetQueryResultsResponse

Retrieves the results of a query job.

Parameters:

  • project_id (String)

    [Required] Project ID of the query job

  • job_id (String)

    [Required] Job ID of the query job

  • location (String) (defaults to: nil)

    The geographic location where the job should run. Required except for US and EU. See details at https://cloud.google.com/bigquery/docs/locations# specifying_your_location.

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to read

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • start_index (Fixnum) (defaults to: nil)

    Zero-based index of the starting row

  • timeout_ms (Fixnum) (defaults to: nil)

    How long to wait for the query to complete, in milliseconds, before returning. Default is 10 seconds. If the timeout passes before the job completes, the ' jobComplete' field in the response will be false

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
# File 'generated/google/apis/bigquery_v2/service.rb', line 421

def get_job_query_results(project_id, job_id, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/queries/{jobId}', options)
  command.response_representation = Google::Apis::BigqueryV2::GetQueryResultsResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::GetQueryResultsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['jobId'] = job_id unless job_id.nil?
  command.query['location'] = location unless location.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['startIndex'] = start_index unless start_index.nil?
  command.query['timeoutMs'] = timeout_ms unless timeout_ms.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Model

Gets the specified model resource by model ID.

Parameters:

  • project_id (String)

    Required. Project ID of the requested model.

  • dataset_id (String)

    Required. Dataset ID of the requested model.

  • model_id (String)

    Required. Model ID of the requested model.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



647
648
649
650
651
652
653
654
655
656
657
658
# File 'generated/google/apis/bigquery_v2/service.rb', line 647

def get_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
  command.response_representation = Google::Apis::BigqueryV2::Model::Representation
  command.response_class = Google::Apis::BigqueryV2::Model
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['modelId'] = model_id unless model_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_project_service_account(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetServiceAccountResponse

Returns the email address of the service account for your project used for interactions with Google Cloud KMS.

Parameters:

  • project_id (String)

    Project ID for which the service account is requested.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



768
769
770
771
772
773
774
775
776
777
# File 'generated/google/apis/bigquery_v2/service.rb', line 768

def (project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/serviceAccount', options)
  command.response_representation = Google::Apis::BigqueryV2::GetServiceAccountResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::GetServiceAccountResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_routine(project_id, dataset_id, routine_id, read_mask: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Routine

Gets the specified routine resource by routine ID.

Parameters:

  • project_id (String)

    Required. Project ID of the requested routine

  • dataset_id (String)

    Required. Dataset ID of the requested routine

  • routine_id (String)

    Required. Routine ID of the requested routine

  • read_mask (String) (defaults to: nil)

    If set, only the Routine fields in the field mask are returned in the response. If unset, all Routine fields are returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



881
882
883
884
885
886
887
888
889
890
891
892
893
# File 'generated/google/apis/bigquery_v2/service.rb', line 881

def get_routine(project_id, dataset_id, routine_id, read_mask: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}', options)
  command.response_representation = Google::Apis::BigqueryV2::Routine::Representation
  command.response_class = Google::Apis::BigqueryV2::Routine
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['routineId'] = routine_id unless routine_id.nil?
  command.query['readMask'] = read_mask unless read_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table

Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.

Parameters:

  • project_id (String)

    Project ID of the requested table

  • dataset_id (String)

    Dataset ID of the requested table

  • table_id (String)

    Table ID of the requested table

  • selected_fields (String) (defaults to: nil)

    List of fields to return (comma-separated). If unspecified, all fields are returned

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
# File 'generated/google/apis/bigquery_v2/service.rb', line 1242

def get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', options)
  command.response_representation = Google::Apis::BigqueryV2::Table::Representation
  command.response_class = Google::Apis::BigqueryV2::Table
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['selectedFields'] = selected_fields unless selected_fields.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#get_table_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Policy

Gets the access control policy for a resource. Returns an empty policy if the resource exists and does not have a policy set.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being requested. See the operation documentation for the appropriate value for this field.

  • get_iam_policy_request_object (Google::Apis::BigqueryV2::GetIamPolicyRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
# File 'generated/google/apis/bigquery_v2/service.rb', line 1281

def get_table_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, '{+resource}:getIamPolicy', options)
  command.request_representation = Google::Apis::BigqueryV2::GetIamPolicyRequest::Representation
  command.request_object = get_iam_policy_request_object
  command.response_representation = Google::Apis::BigqueryV2::Policy::Representation
  command.response_class = Google::Apis::BigqueryV2::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::InsertAllTableDataResponse

Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.

Parameters:

  • project_id (String)

    Project ID of the destination table.

  • dataset_id (String)

    Dataset ID of the destination table.

  • table_id (String)

    Table ID of the destination table.

  • insert_all_table_data_request_object (Google::Apis::BigqueryV2::InsertAllTableDataRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
# File 'generated/google/apis/bigquery_v2/service.rb', line 1105

def insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll', options)
  command.request_representation = Google::Apis::BigqueryV2::InsertAllTableDataRequest::Representation
  command.request_object = insert_all_table_data_request_object
  command.response_representation = Google::Apis::BigqueryV2::InsertAllTableDataResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::InsertAllTableDataResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset

Creates a new empty dataset.

Parameters:

  • project_id (String)

    Project ID of the new dataset

  • dataset_object (Google::Apis::BigqueryV2::Dataset) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



154
155
156
157
158
159
160
161
162
163
164
165
# File 'generated/google/apis/bigquery_v2/service.rb', line 154

def insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{projectId}/datasets', options)
  command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.request_object = dataset_object
  command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.response_class = Google::Apis::BigqueryV2::Dataset
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_job(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job

Starts a new asynchronous job. Requires the Can View project role.

Parameters:

  • project_id (String)

    Project ID of the project that will be billed for the job

  • job_object (Google::Apis::BigqueryV2::Job) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • upload_source (IO, String) (defaults to: nil)

    IO stream or filename containing content to upload

  • content_type (String) (defaults to: nil)

    Content type of the uploaded content.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
# File 'generated/google/apis/bigquery_v2/service.rb', line 465

def insert_job(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block)
  if upload_source.nil?
    command = make_simple_command(:post, 'projects/{projectId}/jobs', options)
  else
    command = make_upload_command(:post, 'projects/{projectId}/jobs', options)
    command.upload_source = upload_source
    command.upload_content_type = content_type
  end
  command.request_representation = Google::Apis::BigqueryV2::Job::Representation
  command.request_object = job_object
  command.response_representation = Google::Apis::BigqueryV2::Job::Representation
  command.response_class = Google::Apis::BigqueryV2::Job
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_routine(project_id, dataset_id, routine_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Routine

Creates a new routine in the dataset.

Parameters:

  • project_id (String)

    Required. Project ID of the new routine

  • dataset_id (String)

    Required. Dataset ID of the new routine

  • routine_object (Google::Apis::BigqueryV2::Routine) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



920
921
922
923
924
925
926
927
928
929
930
931
932
# File 'generated/google/apis/bigquery_v2/service.rb', line 920

def insert_routine(project_id, dataset_id, routine_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{+projectId}/datasets/{+datasetId}/routines', options)
  command.request_representation = Google::Apis::BigqueryV2::Routine::Representation
  command.request_object = routine_object
  command.response_representation = Google::Apis::BigqueryV2::Routine::Representation
  command.response_class = Google::Apis::BigqueryV2::Routine
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table

Creates a new, empty table in the dataset.

Parameters:

  • project_id (String)

    Project ID of the new table

  • dataset_id (String)

    Dataset ID of the new table

  • table_object (Google::Apis::BigqueryV2::Table) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
# File 'generated/google/apis/bigquery_v2/service.rb', line 1319

def insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{projectId}/datasets/{datasetId}/tables', options)
  command.request_representation = Google::Apis::BigqueryV2::Table::Representation
  command.request_object = table_object
  command.response_representation = Google::Apis::BigqueryV2::Table::Representation
  command.response_class = Google::Apis::BigqueryV2::Table
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::DatasetList

Lists all datasets in the specified project to which you have been granted the READER dataset role.

Parameters:

  • project_id (String)

    Project ID of the datasets to be listed

  • all (Boolean) (defaults to: nil)

    Whether to list all datasets, including hidden ones

  • filter (String) (defaults to: nil)

    An expression for filtering the results of the request by label. The syntax is "labels.[:]". Multiple filters can be ANDed together by connecting with a space. Example: "labels.department:receiving labels.active". See Filtering datasets using labels for details.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of results to return

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



201
202
203
204
205
206
207
208
209
210
211
212
213
214
# File 'generated/google/apis/bigquery_v2/service.rb', line 201

def list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/datasets', options)
  command.response_representation = Google::Apis::BigqueryV2::DatasetList::Representation
  command.response_class = Google::Apis::BigqueryV2::DatasetList
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['all'] = all unless all.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_jobs(project_id, all_users: nil, max_creation_time: nil, max_results: nil, min_creation_time: nil, page_token: nil, parent_job_id: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::JobList

Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.

Parameters:

  • project_id (String)

    Project ID of the jobs to list

  • all_users (Boolean) (defaults to: nil)

    Whether to display jobs owned by all users in the project. Default false

  • max_creation_time (Fixnum) (defaults to: nil)

    Max value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created before or at this timestamp are returned

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return

  • min_creation_time (Fixnum) (defaults to: nil)

    Min value for job creation time, in milliseconds since the POSIX epoch. If set, only jobs created after or at this timestamp are returned

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • parent_job_id (String) (defaults to: nil)

    If set, retrieves only jobs whose parent is this job. Otherwise, retrieves only jobs which have no parent

  • projection (String) (defaults to: nil)

    Restrict information returned to a set of selected fields

  • state_filter (Array<String>, String) (defaults to: nil)

    Filter for job state

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
# File 'generated/google/apis/bigquery_v2/service.rb', line 528

def list_jobs(project_id, all_users: nil, max_creation_time: nil, max_results: nil, min_creation_time: nil, page_token: nil, parent_job_id: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/jobs', options)
  command.response_representation = Google::Apis::BigqueryV2::JobList::Representation
  command.response_class = Google::Apis::BigqueryV2::JobList
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['allUsers'] = all_users unless all_users.nil?
  command.query['maxCreationTime'] = max_creation_time unless max_creation_time.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['minCreationTime'] = min_creation_time unless min_creation_time.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['parentJobId'] = parent_job_id unless parent_job_id.nil?
  command.query['projection'] = projection unless projection.nil?
  command.query['stateFilter'] = state_filter unless state_filter.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_models(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ListModelsResponse

Lists all models in the specified dataset. Requires the READER dataset role.

Parameters:

  • project_id (String)

    Required. Project ID of the models to list.

  • dataset_id (String)

    Required. Dataset ID of the models to list.

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call to request the next page of results

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



689
690
691
692
693
694
695
696
697
698
699
700
701
# File 'generated/google/apis/bigquery_v2/service.rb', line 689

def list_models(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/models', options)
  command.response_representation = Google::Apis::BigqueryV2::ListModelsResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::ListModelsResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ProjectList

Lists all projects to which you have been granted any project role.

Parameters:

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



803
804
805
806
807
808
809
810
811
812
813
# File 'generated/google/apis/bigquery_v2/service.rb', line 803

def list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects', options)
  command.response_representation = Google::Apis::BigqueryV2::ProjectList::Representation
  command.response_class = Google::Apis::BigqueryV2::ProjectList
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_routines(project_id, dataset_id, filter: nil, max_results: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ListRoutinesResponse

Lists all routines in the specified dataset. Requires the READER dataset role.

Parameters:

  • project_id (String)

    Required. Project ID of the routines to list

  • dataset_id (String)

    Required. Dataset ID of the routines to list

  • filter (String) (defaults to: nil)

    If set, then only the Routines matching this filter are returned. The current supported form is either "routine_type:" or "routineType:", where is a RoutineType enum. Example: "routineType:SCALAR_FUNCTION".

  • max_results (Fixnum) (defaults to: nil)

    The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • read_mask (String) (defaults to: nil)

    If set, then only the Routine fields in the field mask, as well as project_id, dataset_id and routine_id, are returned in the response. If unset, then the following Routine fields are returned: etag, project_id, dataset_id, routine_id, routine_type, creation_time, last_modified_time, and language.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
# File 'generated/google/apis/bigquery_v2/service.rb', line 972

def list_routines(project_id, dataset_id, filter: nil, max_results: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/routines', options)
  command.response_representation = Google::Apis::BigqueryV2::ListRoutinesResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::ListRoutinesResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['readMask'] = read_mask unless read_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_row_access_policies(project_id, dataset_id, table_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ListRowAccessPoliciesResponse

Lists all row access policies on the specified table.

Parameters:

  • project_id (String)

    Required. Project ID of the row access policies to list.

  • dataset_id (String)

    Required. Dataset ID of row access policies to list.

  • table_id (String)

    Required. Table ID of the table to list row access policies.

  • page_size (Fixnum) (defaults to: nil)

    The maximum number of results to return in a single response page. Leverage the page tokens to iterate through the entire collection.

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
# File 'generated/google/apis/bigquery_v2/service.rb', line 1062

def list_row_access_policies(project_id, dataset_id, table_id, page_size: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies', options)
  command.response_representation = Google::Apis::BigqueryV2::ListRowAccessPoliciesResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::ListRowAccessPoliciesResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableDataList

Retrieves table data from a specified set of rows. Requires the READER dataset role.

Parameters:

  • project_id (String)

    Project ID of the table to read

  • dataset_id (String)

    Dataset ID of the table to read

  • table_id (String)

    Table ID of the table to read

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, identifying the result set

  • selected_fields (String) (defaults to: nil)

    List of fields to return (comma-separated). If unspecified, all fields are returned

  • start_index (Fixnum) (defaults to: nil)

    Zero-based index of the starting row to read

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
# File 'generated/google/apis/bigquery_v2/service.rb', line 1156

def list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data', options)
  command.response_representation = Google::Apis::BigqueryV2::TableDataList::Representation
  command.response_class = Google::Apis::BigqueryV2::TableDataList
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['selectedFields'] = selected_fields unless selected_fields.nil?
  command.query['startIndex'] = start_index unless start_index.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableList

Lists all tables in the specified dataset. Requires the READER dataset role.

Parameters:

  • project_id (String)

    Project ID of the tables to list

  • dataset_id (String)

    Dataset ID of the tables to list

  • max_results (Fixnum) (defaults to: nil)

    Maximum number of results to return

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
# File 'generated/google/apis/bigquery_v2/service.rb', line 1361

def list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables', options)
  command.response_representation = Google::Apis::BigqueryV2::TableList::Representation
  command.response_class = Google::Apis::BigqueryV2::TableList
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['maxResults'] = max_results unless max_results.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset

Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.

Parameters:

  • project_id (String)

    Project ID of the dataset being updated

  • dataset_id (String)

    Dataset ID of the dataset being updated

  • dataset_object (Google::Apis::BigqueryV2::Dataset) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'generated/google/apis/bigquery_v2/service.rb', line 244

def patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'projects/{projectId}/datasets/{datasetId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.request_object = dataset_object
  command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.response_class = Google::Apis::BigqueryV2::Dataset
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Model

Patch specific fields in the specified model.

Parameters:

  • project_id (String)

    Required. Project ID of the model to patch.

  • dataset_id (String)

    Required. Dataset ID of the model to patch.

  • model_id (String)

    Required. Model ID of the model to patch.

  • model_object (Google::Apis::BigqueryV2::Model) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



730
731
732
733
734
735
736
737
738
739
740
741
742
743
# File 'generated/google/apis/bigquery_v2/service.rb', line 730

def patch_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'projects/{+projectId}/datasets/{+datasetId}/models/{+modelId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Model::Representation
  command.request_object = model_object
  command.response_representation = Google::Apis::BigqueryV2::Model::Representation
  command.response_class = Google::Apis::BigqueryV2::Model
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['modelId'] = model_id unless model_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#patch_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table

Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.

Parameters:

  • project_id (String)

    Project ID of the table to update

  • dataset_id (String)

    Dataset ID of the table to update

  • table_id (String)

    Table ID of the table to update

  • table_object (Google::Apis::BigqueryV2::Table) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
# File 'generated/google/apis/bigquery_v2/service.rb', line 1404

def patch_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:patch, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Table::Representation
  command.request_object = table_object
  command.response_representation = Google::Apis::BigqueryV2::Table::Representation
  command.response_class = Google::Apis::BigqueryV2::Table
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#query_job(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::QueryResponse

Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.

Parameters:

  • project_id (String)

    Project ID of the project billed for the query

  • query_request_object (Google::Apis::BigqueryV2::QueryRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



571
572
573
574
575
576
577
578
579
580
581
582
# File 'generated/google/apis/bigquery_v2/service.rb', line 571

def query_job(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{projectId}/queries', options)
  command.request_representation = Google::Apis::BigqueryV2::QueryRequest::Representation
  command.request_object = query_request_object
  command.response_representation = Google::Apis::BigqueryV2::QueryResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::QueryResponse
  command.params['projectId'] = project_id unless project_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#set_table_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Policy

Sets the access control policy on the specified resource. Replaces any existing policy. Can return NOT_FOUND, INVALID_ARGUMENT, and PERMISSION_DENIED errors.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy is being specified. See the operation documentation for the appropriate value for this field.

  • set_iam_policy_request_object (Google::Apis::BigqueryV2::SetIamPolicyRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
# File 'generated/google/apis/bigquery_v2/service.rb', line 1445

def set_table_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, '{+resource}:setIamPolicy', options)
  command.request_representation = Google::Apis::BigqueryV2::SetIamPolicyRequest::Representation
  command.request_object = set_iam_policy_request_object
  command.response_representation = Google::Apis::BigqueryV2::Policy::Representation
  command.response_class = Google::Apis::BigqueryV2::Policy
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#test_table_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TestIamPermissionsResponse

Returns permissions that a caller has on the specified resource. If the resource does not exist, this will return an empty set of permissions, not a NOT_FOUND error. Note: This operation is designed to be used for building permission-aware UIs and command-line tools, not for authorization checking. This operation may "fail open" without warning.

Parameters:

  • resource (String)

    REQUIRED: The resource for which the policy detail is being requested. See the operation documentation for the appropriate value for this field.

  • test_iam_permissions_request_object (Google::Apis::BigqueryV2::TestIamPermissionsRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
# File 'generated/google/apis/bigquery_v2/service.rb', line 1486

def test_table_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:post, '{+resource}:testIamPermissions', options)
  command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation
  command.request_object = test_iam_permissions_request_object
  command.response_representation = Google::Apis::BigqueryV2::TestIamPermissionsResponse::Representation
  command.response_class = Google::Apis::BigqueryV2::TestIamPermissionsResponse
  command.params['resource'] = resource unless resource.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset

Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.

Parameters:

  • project_id (String)

    Project ID of the dataset being updated

  • dataset_id (String)

    Dataset ID of the dataset being updated

  • dataset_object (Google::Apis::BigqueryV2::Dataset) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'generated/google/apis/bigquery_v2/service.rb', line 285

def update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'projects/{projectId}/datasets/{datasetId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.request_object = dataset_object
  command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation
  command.response_class = Google::Apis::BigqueryV2::Dataset
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_routine(project_id, dataset_id, routine_id, routine_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Routine

Updates information in an existing routine. The update method replaces the entire Routine resource.

Parameters:

  • project_id (String)

    Required. Project ID of the routine to update

  • dataset_id (String)

    Required. Dataset ID of the routine to update

  • routine_id (String)

    Required. Routine ID of the routine to update

  • routine_object (Google::Apis::BigqueryV2::Routine) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
# File 'generated/google/apis/bigquery_v2/service.rb', line 1016

def update_routine(project_id, dataset_id, routine_id, routine_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'projects/{+projectId}/datasets/{+datasetId}/routines/{+routineId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Routine::Representation
  command.request_object = routine_object
  command.response_representation = Google::Apis::BigqueryV2::Routine::Representation
  command.response_class = Google::Apis::BigqueryV2::Routine
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['routineId'] = routine_id unless routine_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end

#update_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table

Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.

Parameters:

  • project_id (String)

    Project ID of the table to update

  • dataset_id (String)

    Dataset ID of the table to update

  • table_id (String)

    Table ID of the table to update

  • table_object (Google::Apis::BigqueryV2::Table) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

  • user_ip (String) (defaults to: nil)

    Deprecated. Please use quotaUser instead.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
# File 'generated/google/apis/bigquery_v2/service.rb', line 1528

def update_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block)
  command = make_simple_command(:put, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', options)
  command.request_representation = Google::Apis::BigqueryV2::Table::Representation
  command.request_object = table_object
  command.response_representation = Google::Apis::BigqueryV2::Table::Representation
  command.response_class = Google::Apis::BigqueryV2::Table
  command.params['projectId'] = project_id unless project_id.nil?
  command.params['datasetId'] = dataset_id unless dataset_id.nil?
  command.params['tableId'] = table_id unless table_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  command.query['userIp'] = user_ip unless user_ip.nil?
  execute_or_queue_command(command, &block)
end