Class: Google::Apis::BigqueryV2::BigqueryService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BigqueryV2::BigqueryService
- Defined in:
- generated/google/apis/bigquery_v2/service.rb
Overview
BigQuery API
A data platform for customers to create, manage, share and query data.
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
-
#user_ip ⇒ String
IP address of the site where the request originates.
Attributes inherited from Core::BaseService
#authorization, #base_path, #batch_path, #client, #client_options, #request_options, #root_url, #upload_path
Instance Method Summary collapse
-
#cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::CancelJobResponse
Requests that a job be cancelled.
-
#delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes the dataset specified by the datasetId value.
-
#delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
Deletes the table specified by tableId from the dataset.
-
#get_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Returns the dataset specified by datasetID.
-
#get_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Returns information about a specific job.
-
#get_job_query_results(project_id, job_id, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetQueryResultsResponse
Retrieves the results of a query job.
-
#get_project_service_account(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetServiceAccountResponse
Returns the email address of the service account for your project used for interactions with Google Cloud KMS.
-
#get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Gets the specified table resource by table ID.
-
#initialize ⇒ BigqueryService
constructor
A new instance of BigqueryService.
-
#insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::InsertAllTableDataResponse
Streams data into BigQuery one record at a time without needing to run a load job.
-
#insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Creates a new empty dataset.
-
#insert_job(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Starts a new asynchronous job.
-
#insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Creates a new, empty table in the dataset.
-
#list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::DatasetList
Lists all datasets in the specified project to which you have been granted the READER dataset role.
-
#list_jobs(project_id, all_users: nil, max_creation_time: nil, max_results: nil, min_creation_time: nil, page_token: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::JobList
Lists all jobs that you started in the specified project.
-
#list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ProjectList
Lists all projects to which you have been granted any project role.
-
#list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableDataList
Retrieves table data from a specified set of rows.
-
#list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableList
Lists all tables in the specified dataset.
-
#patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset.
-
#patch_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Updates information in an existing table.
-
#query_job(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::QueryResponse
Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
-
#update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset.
-
#update_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Updates information in an existing table.
Methods inherited from Core::BaseService
#batch, #batch_upload, #fetch_all, #http
Methods included from Core::Logging
Constructor Details
#initialize ⇒ BigqueryService
Returns a new instance of BigqueryService
51 52 53 54 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 51 def initialize super('https://www.googleapis.com/', 'bigquery/v2/') @batch_path = 'batch/bigquery/v2' end |
Instance Attribute Details
#key ⇒ String
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.
38 39 40 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 38 def key @key end |
#quota_user ⇒ String
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. Overrides userIp if both are provided.
44 45 46 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 44 def quota_user @quota_user end |
#user_ip ⇒ String
Returns IP address of the site where the request originates. Use this if you want to enforce per-user limits.
49 50 51 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 49 def user_ip @user_ip end |
Instance Method Details
#cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::CancelJobResponse
Requests that a job be cancelled. This call will return immediately, and the client will need to poll for the job status to see if the cancel completed successfully. Cancelled jobs may still incur costs.
344 345 346 347 348 349 350 351 352 353 354 355 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 344 def cancel_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/jobs/{jobId}/cancel', ) command.response_representation = Google::Apis::BigqueryV2::CancelJobResponse::Representation command.response_class = Google::Apis::BigqueryV2::CancelJobResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['location'] = location unless location.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the dataset specified by the datasetId value. Before you can delete a dataset, you must delete all its tables, either manually or by specifying deleteContents. Immediately after deletion, you can create another dataset with the same name.
88 89 90 91 92 93 94 95 96 97 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 88 def delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{projectId}/datasets/{datasetId}', ) command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['deleteContents'] = delete_contents unless delete_contents.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes the table specified by tableId from the dataset. If the table contains data, all the data will be deleted.
808 809 810 811 812 813 814 815 816 817 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 808 def delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', ) command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Returns the dataset specified by datasetID.
125 126 127 128 129 130 131 132 133 134 135 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 125 def get_dataset(project_id, dataset_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}', ) command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation command.response_class = Google::Apis::BigqueryV2::Dataset command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Returns information about a specific job. Job information is available for a six month period after creation. Requires that you're the person who ran the job, or have the Is Owner project role.
388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 388 def get_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/jobs/{jobId}', ) command.response_representation = Google::Apis::BigqueryV2::Job::Representation command.response_class = Google::Apis::BigqueryV2::Job command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['location'] = location unless location.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_job_query_results(project_id, job_id, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetQueryResultsResponse
Retrieves the results of a query job.
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 440 def get_job_query_results(project_id, job_id, location: nil, max_results: nil, page_token: nil, start_index: nil, timeout_ms: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/queries/{jobId}', ) command.response_representation = Google::Apis::BigqueryV2::GetQueryResultsResponse::Representation command.response_class = Google::Apis::BigqueryV2::GetQueryResultsResponse command.params['projectId'] = project_id unless project_id.nil? command.params['jobId'] = job_id unless job_id.nil? command.query['location'] = location unless location.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['startIndex'] = start_index unless start_index.nil? command.query['timeoutMs'] = timeout_ms unless timeout_ms.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_project_service_account(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::GetServiceAccountResponse
Returns the email address of the service account for your project used for interactions with Google Cloud KMS.
630 631 632 633 634 635 636 637 638 639 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 630 def get_project_service_account(project_id, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/serviceAccount', ) command.response_representation = Google::Apis::BigqueryV2::GetServiceAccountResponse::Representation command.response_class = Google::Apis::BigqueryV2::GetServiceAccountResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Gets the specified table resource by table ID. This method does not return the data in the table, it only returns the table resource, which describes the structure of this table.
852 853 854 855 856 857 858 859 860 861 862 863 864 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 852 def get_table(project_id, dataset_id, table_id, selected_fields: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', ) command.response_representation = Google::Apis::BigqueryV2::Table::Representation command.response_class = Google::Apis::BigqueryV2::Table command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['selectedFields'] = selected_fields unless selected_fields.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::InsertAllTableDataResponse
Streams data into BigQuery one record at a time without needing to run a load job. Requires the WRITER dataset role.
709 710 711 712 713 714 715 716 717 718 719 720 721 722 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 709 def insert_all_table_data(project_id, dataset_id, table_id, insert_all_table_data_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/insertAll', ) command.request_representation = Google::Apis::BigqueryV2::InsertAllTableDataRequest::Representation command.request_object = insert_all_table_data_request_object command.response_representation = Google::Apis::BigqueryV2::InsertAllTableDataResponse::Representation command.response_class = Google::Apis::BigqueryV2::InsertAllTableDataResponse command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Creates a new empty dataset.
162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 162 def insert_dataset(project_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/datasets', ) command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation command.request_object = dataset_object command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation command.response_class = Google::Apis::BigqueryV2::Dataset command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_job(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Starts a new asynchronous job. Requires the Can View project role.
486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 486 def insert_job(project_id, job_object = nil, fields: nil, quota_user: nil, user_ip: nil, upload_source: nil, content_type: nil, options: nil, &block) if upload_source.nil? command = make_simple_command(:post, 'projects/{projectId}/jobs', ) else command = make_upload_command(:post, 'projects/{projectId}/jobs', ) command.upload_source = upload_source command.upload_content_type = content_type end command.request_representation = Google::Apis::BigqueryV2::Job::Representation command.request_object = job_object command.response_representation = Google::Apis::BigqueryV2::Job::Representation command.response_class = Google::Apis::BigqueryV2::Job command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Creates a new, empty table in the dataset.
893 894 895 896 897 898 899 900 901 902 903 904 905 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 893 def insert_table(project_id, dataset_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/datasets/{datasetId}/tables', ) command.request_representation = Google::Apis::BigqueryV2::Table::Representation command.request_object = table_object command.response_representation = Google::Apis::BigqueryV2::Table::Representation command.response_class = Google::Apis::BigqueryV2::Table command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::DatasetList
Lists all datasets in the specified project to which you have been granted the READER dataset role.
211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 211 def list_datasets(project_id, all: nil, filter: nil, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets', ) command.response_representation = Google::Apis::BigqueryV2::DatasetList::Representation command.response_class = Google::Apis::BigqueryV2::DatasetList command.params['projectId'] = project_id unless project_id.nil? command.query['all'] = all unless all.nil? command.query['filter'] = filter unless filter.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_jobs(project_id, all_users: nil, max_creation_time: nil, max_results: nil, min_creation_time: nil, page_token: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::JobList
Lists all jobs that you started in the specified project. Job information is available for a six month period after creation. The job list is sorted in reverse chronological order, by job creation time. Requires the Can View project role, or the Is Owner project role if you set the allUsers property.
548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 548 def list_jobs(project_id, all_users: nil, max_creation_time: nil, max_results: nil, min_creation_time: nil, page_token: nil, projection: nil, state_filter: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/jobs', ) 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['projection'] = projection unless projection.nil? command.query['stateFilter'] = state_filter unless state_filter.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::ProjectList
Lists all projects to which you have been granted any project role.
667 668 669 670 671 672 673 674 675 676 677 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 667 def list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects', ) command.response_representation = Google::Apis::BigqueryV2::ProjectList::Representation command.response_class = Google::Apis::BigqueryV2::ProjectList command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableDataList
Retrieves table data from a specified set of rows. Requires the READER dataset role.
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 762 def list_table_data(project_id, dataset_id, table_id, max_results: nil, page_token: nil, selected_fields: nil, start_index: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}/data', ) command.response_representation = Google::Apis::BigqueryV2::TableDataList::Representation command.response_class = Google::Apis::BigqueryV2::TableDataList command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['selectedFields'] = selected_fields unless selected_fields.nil? command.query['startIndex'] = start_index unless start_index.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::TableList
Lists all tables in the specified dataset. Requires the READER dataset role.
937 938 939 940 941 942 943 944 945 946 947 948 949 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 937 def list_tables(project_id, dataset_id, max_results: nil, page_token: nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{projectId}/datasets/{datasetId}/tables', ) command.response_representation = Google::Apis::BigqueryV2::TableList::Representation command.response_class = Google::Apis::BigqueryV2::TableList command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['maxResults'] = max_results unless max_results.nil? command.query['pageToken'] = page_token unless page_token.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource. This method supports patch semantics.
256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 256 def patch_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'projects/{projectId}/datasets/{datasetId}', ) command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation command.request_object = dataset_object command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation command.response_class = Google::Apis::BigqueryV2::Dataset command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#patch_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource. This method supports patch semantics.
982 983 984 985 986 987 988 989 990 991 992 993 994 995 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 982 def patch_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:patch, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', ) command.request_representation = Google::Apis::BigqueryV2::Table::Representation command.request_object = table_object command.response_representation = Google::Apis::BigqueryV2::Table::Representation command.response_class = Google::Apis::BigqueryV2::Table command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#query_job(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::QueryResponse
Runs a BigQuery SQL query synchronously and returns query results if the query completes within a specified timeout.
592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 592 def query_job(project_id, query_request_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{projectId}/queries', ) command.request_representation = Google::Apis::BigqueryV2::QueryRequest::Representation command.request_object = query_request_object command.response_representation = Google::Apis::BigqueryV2::QueryResponse::Representation command.response_class = Google::Apis::BigqueryV2::QueryResponse command.params['projectId'] = project_id unless project_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset. The update method replaces the entire dataset resource, whereas the patch method only replaces fields that are provided in the submitted dataset resource.
299 300 301 302 303 304 305 306 307 308 309 310 311 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 299 def update_dataset(project_id, dataset_id, dataset_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{projectId}/datasets/{datasetId}', ) command.request_representation = Google::Apis::BigqueryV2::Dataset::Representation command.request_object = dataset_object command.response_representation = Google::Apis::BigqueryV2::Dataset::Representation command.response_class = Google::Apis::BigqueryV2::Dataset command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |
#update_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Table
Updates information in an existing table. The update method replaces the entire table resource, whereas the patch method only replaces fields that are provided in the submitted table resource.
1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 |
# File 'generated/google/apis/bigquery_v2/service.rb', line 1028 def update_table(project_id, dataset_id, table_id, table_object = nil, fields: nil, quota_user: nil, user_ip: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{projectId}/datasets/{datasetId}/tables/{tableId}', ) command.request_representation = Google::Apis::BigqueryV2::Table::Representation command.request_object = table_object command.response_representation = Google::Apis::BigqueryV2::Table::Representation command.response_class = Google::Apis::BigqueryV2::Table command.params['projectId'] = project_id unless project_id.nil? command.params['datasetId'] = dataset_id unless dataset_id.nil? command.params['tableId'] = table_id unless table_id.nil? command.query['fields'] = fields unless fields.nil? command.query['quotaUser'] = quota_user unless quota_user.nil? command.query['userIp'] = user_ip unless user_ip.nil? execute_or_queue_command(command, &block) end |