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

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/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:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://bigquery.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBigqueryService

Returns a new instance of BigqueryService.



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

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, 'bigquery/v2/',
        client_name: 'google-apis-bigquery_v2',
        client_version: Google::Apis::BigqueryV2::GEM_VERSION)
  @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.



40
41
42
# File 'lib/google/apis/bigquery_v2/service.rb', line 40

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



45
46
47
# File 'lib/google/apis/bigquery_v2/service.rb', line 45

def quota_user
  @quota_user
end

Instance Method Details

#cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: 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. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the us or the eu multi-regional location * If the job's location is in a single region (for example, us-central1) For more information, see 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



355
356
357
358
359
360
361
362
363
364
365
# File 'lib/google/apis/bigquery_v2/service.rb', line 355

def cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: 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)

    Required. Project ID of the dataset being deleted

  • dataset_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



82
83
84
85
86
87
88
89
90
# File 'lib/google/apis/bigquery_v2/service.rb', line 82

def delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#delete_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }

This method returns an undefined value.

Requests the deletion of the metadata of a job. This call returns when the job' s metadata is deleted.

Parameters:

  • project_id (String)

    Required. Project ID of the job for which metadata is to be deleted.

  • job_id (String)

    Required. Job ID of the job for which metadata is to be deleted. If this is a parent job which has child jobs, the metadata from all child jobs will be deleted as well. Direct deletion of the metadata of child jobs is not allowed.

  • location (String) (defaults to: nil)

    The geographic location of the job. Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



395
396
397
398
399
400
401
402
403
# File 'lib/google/apis/bigquery_v2/service.rb', line 395

def delete_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'projects/{+projectId}/jobs/{+jobId}/delete', options)
  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?
  execute_or_queue_command(command, &block)
end

#delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



678
679
680
681
682
683
684
685
686
# File 'lib/google/apis/bigquery_v2/service.rb', line 678

def delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#delete_routine(project_id, dataset_id, routine_id, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



899
900
901
902
903
904
905
906
907
# File 'lib/google/apis/bigquery_v2/service.rb', line 899

def delete_routine(project_id, dataset_id, routine_id, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: 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)

    Required. Project ID of the table to delete

  • dataset_id (String)

    Required. Dataset ID of the table to delete

  • table_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1386
1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/google/apis/bigquery_v2/service.rb', line 1386

def delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

Returns the dataset specified by datasetID.

Parameters:

  • project_id (String)

    Required. Project ID of the requested dataset

  • dataset_id (String)

    Required. Dataset ID of the requested dataset

  • dataset_view (String) (defaults to: nil)

    Optional. Specifies the view that determines which dataset information is returned. By default, metadata and ACL information are returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



117
118
119
120
121
122
123
124
125
126
127
# File 'lib/google/apis/bigquery_v2/service.rb', line 117

def get_dataset(project_id, dataset_id, dataset_view: nil, fields: nil, quota_user: 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['datasetView'] = dataset_view unless dataset_view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_job(project_id, job_id, location: nil, fields: nil, quota_user: 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. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the us or the eu multi-regional location * If the job's location is in a single region (for example, us-central1) For more information, see 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



435
436
437
438
439
440
441
442
443
444
445
# File 'lib/google/apis/bigquery_v2/service.rb', line 435

def get_job(project_id, job_id, location: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

RPC to get 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.

  • format_options_use_int64_timestamp (Boolean) (defaults to: nil)

    Optional. Output timestamp as usec int64. Default is false.

  • location (String) (defaults to: nil)

    The geographic location of the job. You must specify the location to run the job for the following scenarios: * If the location to run a job is not in the us or the eu multi-regional location * If the job's location is in a single region (for example, us-central1) For more information, see 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)

    Optional: Specifies the maximum amount of time, in milliseconds, that the client is willing to wait for the query to complete. By default, this limit is 10 seconds (10,000 milliseconds). If the query is complete, the jobComplete field in the response is true. If the query has not yet completed, jobComplete is false. You can request a longer timeout period in the timeoutMs field. However, the call is not guaranteed to wait for the specified timeout; it typically returns after around 200 seconds (200,000 milliseconds), even if the query is not complete. If jobComplete is false, you can continue to wait for the query to complete by calling the getQueryResults method until the jobComplete field in the getQueryResults response is true.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
# File 'lib/google/apis/bigquery_v2/service.rb', line 494

def get_job_query_results(project_id, job_id, format_options_use_int64_timestamp: nil, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: 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['formatOptions.useInt64Timestamp'] = format_options_use_int64_timestamp unless format_options_use_int64_timestamp.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?
  execute_or_queue_command(command, &block)
end

#get_model(project_id, dataset_id, model_id, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



712
713
714
715
716
717
718
719
720
721
722
# File 'lib/google/apis/bigquery_v2/service.rb', line 712

def get_model(project_id, dataset_id, model_id, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

RPC to get the service account for a project used for interactions with Google Cloud KMS

Parameters:

  • project_id (String)

    Required. ID of the project.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



826
827
828
829
830
831
832
833
834
# File 'lib/google/apis/bigquery_v2/service.rb', line 826

def (project_id, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#get_routine(project_id, dataset_id, routine_id, read_mask: nil, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



936
937
938
939
940
941
942
943
944
945
946
947
# File 'lib/google/apis/bigquery_v2/service.rb', line 936

def get_routine(project_id, dataset_id, routine_id, read_mask: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#get_routine_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



973
974
975
976
977
978
979
980
981
982
983
# File 'lib/google/apis/bigquery_v2/service.rb', line 973

def get_routine_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#get_row_access_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
# File 'lib/google/apis/bigquery_v2/service.rb', line 1173

def get_row_access_policy_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#get_table(project_id, dataset_id, table_id, selected_fields: nil, view: nil, fields: nil, quota_user: 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)

    Required. Project ID of the requested table

  • dataset_id (String)

    Required. Dataset ID of the requested table

  • table_id (String)

    Required. Table ID of the requested table

  • selected_fields (String) (defaults to: nil)

    List of table schema fields to return (comma-separated). If unspecified, all fields are returned. A fieldMask cannot be used here because the fields will automatically be converted from camelCase to snake_case and the conversion will fail if there are underscores. Since these are fields in BigQuery table schemas, underscores are allowed.

  • view (String) (defaults to: nil)

    Optional. Specifies the view that determines which table information is returned. By default, basic table information and storage statistics ( STORAGE_STATS) are returned.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
# File 'lib/google/apis/bigquery_v2/service.rb', line 1432

def get_table(project_id, dataset_id, table_id, selected_fields: nil, view: nil, fields: nil, quota_user: 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['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_table_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
# File 'lib/google/apis/bigquery_v2/service.rb', line 1470

def get_table_iam_policy(resource, get_iam_policy_request_object = nil, fields: nil, quota_user: 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?
  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, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::InsertAllTableDataResponse

Streams data into BigQuery one record at a time without needing to run a load job.

Parameters:

  • project_id (String)

    Required. Project ID of the destination.

  • dataset_id (String)

    Required. Dataset ID of the destination.

  • table_id (String)

    Required. Table ID of the destination.

  • 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
# File 'lib/google/apis/bigquery_v2/service.rb', line 1293

def insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

Creates a new empty dataset.

Parameters:

  • project_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



150
151
152
153
154
155
156
157
158
159
160
# File 'lib/google/apis/bigquery_v2/service.rb', line 150

def insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

Starts a new asynchronous job. This API has two different kinds of endpoint URIs, as this method supports a variety of use cases. * The Metadata URI is used for most interactions, as it accepts the job configuration directly. * The Upload URI is ONLY for the case when you're sending both a load job configuration and a data stream together. In this case, the Upload URI accepts the job configuration and the data as two distinct multipart MIME parts.

Parameters:

  • project_id (String)

    Project ID of 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/google/apis/bigquery_v2/service.rb', line 541

def insert_job(project_id, job_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#insert_routine(project_id, dataset_id, routine_object = nil, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
# File 'lib/google/apis/bigquery_v2/service.rb', line 1008

def insert_routine(project_id, dataset_id, routine_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

Creates a new, empty table in the dataset.

Parameters:

  • project_id (String)

    Required. Project ID of the new table

  • dataset_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
# File 'lib/google/apis/bigquery_v2/service.rb', line 1505

def insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: 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?
  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, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::DatasetList

Lists all datasets in the specified project to which the user has been granted the READER dataset role.

Parameters:

  • project_id (String)

    Required. 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 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



196
197
198
199
200
201
202
203
204
205
206
207
208
# File 'lib/google/apis/bigquery_v2/service.rb', line 196

def list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: 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?
  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, 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)

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

  • 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, show only child jobs of the specified parent. Otherwise, show all top- level jobs.

  • 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
# File 'lib/google/apis/bigquery_v2/service.rb', line 602

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, 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?
  execute_or_queue_command(command, &block)
end

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

Lists all models in the specified dataset. Requires the READER dataset role. After retrieving the list of models, you can get information about a particular model by calling the models.get method.

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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



753
754
755
756
757
758
759
760
761
762
763
764
# File 'lib/google/apis/bigquery_v2/service.rb', line 753

def list_models(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

RPC to list projects to which the user has been granted any project role. Users of this method are encouraged to consider the Resource Manager API, which provides the underlying data for this method and has more capabilities.

Parameters:

  • max_results (Fixnum) (defaults to: nil)

    maxResults unset returns all results, up to 50 per page. Additionally, the number of projects in a page may be fewer than maxResults because projects are retrieved and then filtered to only projects with the BigQuery API enabled.

  • page_token (String) (defaults to: nil)

    Page token, returned by a previous call, to request the next page of results. If not present, no further pages are present.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



864
865
866
867
868
869
870
871
872
873
# File 'lib/google/apis/bigquery_v2/service.rb', line 864

def list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: 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?
  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, 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 supported format is routineType:RoutineType, whereRoutineType`is a RoutineType enum. For 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
# File 'lib/google/apis/bigquery_v2/service.rb', line 1057

def list_routines(project_id, dataset_id, filter: nil, max_results: nil, page_token: nil, read_mask: nil, fields: nil, quota_user: 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?
  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, 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
# File 'lib/google/apis/bigquery_v2/service.rb', line 1214

def list_row_access_policies(project_id, dataset_id, table_id, page_size: nil, page_token: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

List the content of a table in rows.

Parameters:

  • project_id (String)

    Required. Project id of the table to list.

  • dataset_id (String)

    Required. Dataset id of the table to list.

  • table_id (String)

    Required. Table id of the table to list.

  • format_options_use_int64_timestamp (Boolean) (defaults to: nil)

    Optional. Output timestamp as usec int64. Default is false.

  • max_results (Fixnum) (defaults to: nil)

    Row limit of the table.

  • page_token (String) (defaults to: nil)

    To retrieve the next page of table data, set this field to the string provided in the pageToken field of the response body from your previous call to tabledata.list.

  • selected_fields (String) (defaults to: nil)

    Subset of fields to return, supports select into sub fields. Example: selected_fields = "a,e.d.f";

  • start_index (Fixnum) (defaults to: nil)

    Start row index of the table.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/google/apis/bigquery_v2/service.rb', line 1344

def list_table_data(project_id, dataset_id, table_id, format_options_use_int64_timestamp: nil, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: 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['formatOptions.useInt64Timestamp'] = format_options_use_int64_timestamp unless format_options_use_int64_timestamp.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?
  execute_or_queue_command(command, &block)
end

#list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: 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)

    Required. Project ID of the tables to list

  • dataset_id (String)

    Required. Dataset ID of the tables 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
# File 'lib/google/apis/bigquery_v2/service.rb', line 1545

def list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: 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 RFC5789 patch semantics.

Parameters:

  • project_id (String)

    Required. Project ID of the dataset being updated

  • dataset_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



236
237
238
239
240
241
242
243
244
245
246
247
# File 'lib/google/apis/bigquery_v2/service.rb', line 236

def patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#patch_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



791
792
793
794
795
796
797
798
799
800
801
802
803
# File 'lib/google/apis/bigquery_v2/service.rb', line 791

def patch_model(project_id, dataset_id, model_id, model_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#patch_table(project_id, dataset_id, table_id, table_object = nil, autodetect_schema: nil, fields: nil, quota_user: 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 RFC5789 patch semantics.

Parameters:

  • project_id (String)

    Required. Project ID of the table to update

  • dataset_id (String)

    Required. Dataset ID of the table to update

  • table_id (String)

    Required. Table ID of the table to update

  • table_object (Google::Apis::BigqueryV2::Table) (defaults to: nil)
  • autodetect_schema (Boolean) (defaults to: nil)

    Optional. When true will autodetect schema, else will keep original schema

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
# File 'lib/google/apis/bigquery_v2/service.rb', line 1588

def patch_table(project_id, dataset_id, table_id, table_object = nil, autodetect_schema: nil, fields: nil, quota_user: 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['autodetect_schema'] = autodetect_schema unless autodetect_schema.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#query_job(project_id, query_request_object = nil, fields: nil, quota_user: 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)

    Required. Project ID of the query request.

  • 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



642
643
644
645
646
647
648
649
650
651
652
# File 'lib/google/apis/bigquery_v2/service.rb', line 642

def query_job(project_id, query_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#set_routine_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
# File 'lib/google/apis/bigquery_v2/service.rb', line 1097

def set_routine_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#set_table_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
# File 'lib/google/apis/bigquery_v2/service.rb', line 1628

def set_table_iam_policy(resource, set_iam_policy_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#test_row_access_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
# File 'lib/google/apis/bigquery_v2/service.rb', line 1255

def test_row_access_policy_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#test_table_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: 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 Resource names 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
# File 'lib/google/apis/bigquery_v2/service.rb', line 1667

def test_table_iam_permissions(resource, test_iam_permissions_request_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

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

Undeletes a dataset which is within time travel window based on datasetId. If a time is specified, the dataset version deleted at that time is undeleted, else the last live version is undeleted.

Parameters:

  • project_id (String)

    Required. Project ID of the dataset to be undeleted

  • dataset_id (String)

    Required. Dataset ID of dataset being deleted

  • undelete_dataset_request_object (Google::Apis::BigqueryV2::UndeleteDatasetRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



274
275
276
277
278
279
280
281
282
283
284
285
# File 'lib/google/apis/bigquery_v2/service.rb', line 274

def undelete_dataset(project_id, dataset_id, undelete_dataset_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'projects/{+projectId}/datasets/{+datasetId}:undelete', options)
  command.request_representation = Google::Apis::BigqueryV2::UndeleteDatasetRequest::Representation
  command.request_object = undelete_dataset_request_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?
  execute_or_queue_command(command, &block)
end

#update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: 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)

    Required. Project ID of the dataset being updated

  • dataset_id (String)

    Required. 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



312
313
314
315
316
317
318
319
320
321
322
323
# File 'lib/google/apis/bigquery_v2/service.rb', line 312

def update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#update_routine(project_id, dataset_id, routine_id, routine_object = nil, fields: nil, quota_user: 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)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
# File 'lib/google/apis/bigquery_v2/service.rb', line 1135

def update_routine(project_id, dataset_id, routine_id, routine_object = nil, fields: nil, quota_user: 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?
  execute_or_queue_command(command, &block)
end

#update_table(project_id, dataset_id, table_id, table_object = nil, autodetect_schema: nil, fields: nil, quota_user: 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)

    Required. Project ID of the table to update

  • dataset_id (String)

    Required. Dataset ID of the table to update

  • table_id (String)

    Required. Table ID of the table to update

  • table_object (Google::Apis::BigqueryV2::Table) (defaults to: nil)
  • autodetect_schema (Boolean) (defaults to: nil)

    Optional. When true will autodetect schema, else will keep original schema

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • 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



1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
# File 'lib/google/apis/bigquery_v2/service.rb', line 1708

def update_table(project_id, dataset_id, table_id, table_object = nil, autodetect_schema: nil, fields: nil, quota_user: 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['autodetect_schema'] = autodetect_schema unless autodetect_schema.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end