Class: Google::Apis::BigqueryV2::BigqueryService
- Inherits:
-
Core::BaseService
- Object
- Core::BaseService
- Google::Apis::BigqueryV2::BigqueryService
- Defined in:
- lib/google/apis/bigquery_v2/service.rb
Overview
BigQuery API
A data platform for customers to create, manage, share and query data.
Constant Summary collapse
- DEFAULT_ENDPOINT_TEMPLATE =
"https://bigquery.$UNIVERSE_DOMAIN$/"
Instance Attribute Summary collapse
-
#key ⇒ String
API key.
-
#quota_user ⇒ String
Available to use for quota purposes for server-side applications.
Instance Method Summary collapse
-
#batch_row_access_policy_delete_row_access_policies(project_id, dataset_id, table_id, batch_delete_row_access_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes provided row access policies.
-
#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.
-
#delete_dataset(project_id, dataset_id, delete_contents: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the dataset specified by the datasetId value.
-
#delete_job(project_id, job_id, location: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Requests the deletion of the metadata of a job.
-
#delete_model(project_id, dataset_id, model_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the model specified by modelId from the dataset.
-
#delete_routine(project_id, dataset_id, routine_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the routine specified by routineId from the dataset.
-
#delete_row_access_policy(project_id, dataset_id, table_id, policy_id, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes a row access policy.
-
#delete_table(project_id, dataset_id, table_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
Deletes the table specified by tableId from the dataset.
-
#get_dataset(project_id, dataset_id, access_policy_version: nil, dataset_view: nil, fields: nil, quota_user: 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, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Returns information about a specific job.
-
#get_job_query_results(project_id, job_id, format_options_timestamp_output_format: nil, 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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#get_row_access_policy(project_id, dataset_id, table_id, policy_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Gets the specified row access policy by policy ID.
-
#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.
-
#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.
-
#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.
-
#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, 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, access_policy_version: nil, fields: nil, quota_user: 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, upload_source: nil, content_type: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Job
Starts a new asynchronous job.
-
#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.
-
#insert_row_access_policy(project_id, dataset_id, table_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Creates a row access policy.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#list_table_data(project_id, dataset_id, table_id, format_options_timestamp_output_format: nil, 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.
-
#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.
-
#patch_dataset(project_id, dataset_id, dataset_object = nil, access_policy_version: nil, update_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset.
-
#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.
-
#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.
-
#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.
-
#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.
-
#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.
-
#test_routine_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.
-
#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.
-
#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.
-
#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.
-
#update_dataset(project_id, dataset_id, dataset_object = nil, access_policy_version: nil, update_mode: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Updates information in an existing dataset.
-
#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.
-
#update_row_access_policy(project_id, dataset_id, table_id, policy_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Updates a row access policy.
-
#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.
Constructor Details
#initialize ⇒ BigqueryService
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
#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.
40 41 42 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 40 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.
45 46 47 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 45 def quota_user @quota_user end |
Instance Method Details
#batch_row_access_policy_delete_row_access_policies(project_id, dataset_id, table_id, batch_delete_row_access_policies_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes provided row access policies. # IAM Permissions Requires the following
IAM permission(s) on the table: - bigquery.rowAccessPolicies.delete -
bigquery.rowAccessPolicies.setIamPolicy
1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1344 def batch_row_access_policy_delete_row_access_policies(project_id, dataset_id, table_id, batch_delete_row_access_policies_request_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies:batchDelete', ) command.request_representation = Google::Apis::BigqueryV2::BatchDeleteRowAccessPoliciesRequest::Representation command.request_object = batch_delete_row_access_policies_request_object 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 |
#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. # IAM Permissions Requires
the bigquery.jobs.update permission on the job resource. If the user matches
the creator of the job, the bigquery.jobs.create permission on the project
is required instead.
434 435 436 437 438 439 440 441 442 443 444 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 434 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', ) 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. # IAM Permissions Requires the bigquery.datasets.delete
permission on the dataset.
83 84 85 86 87 88 89 90 91 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 83 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}', ) 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. # IAM Permissions Requires the bigquery.jobs.delete
permission on the job resource.
476 477 478 479 480 481 482 483 484 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 476 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', ) 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. # IAM Permissions
Requires the bigquery.models.delete permission on the model.
791 792 793 794 795 796 797 798 799 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 791 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}', ) 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. # IAM Permissions
Requires the bigquery.routines.delete permission on the routine.
1023 1024 1025 1026 1027 1028 1029 1030 1031 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1023 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}', ) 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_row_access_policy(project_id, dataset_id, table_id, policy_id, force: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... }
This method returns an undefined value.
Deletes a row access policy. # IAM Permissions Requires the following IAM
permission(s) on the table: - bigquery.rowAccessPolicies.delete - bigquery.
rowAccessPolicies.setIamPolicy
1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1388 def delete_row_access_policy(project_id, dataset_id, table_id, policy_id, force: nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:delete, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies/{+policyId}', ) 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.params['policyId'] = policy_id unless policy_id.nil? command.query['force'] = force unless force.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. # IAM Permissions Requires the bigquery.
tables.delete permission on the table.
1772 1773 1774 1775 1776 1777 1778 1779 1780 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1772 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}', ) 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, access_policy_version: nil, dataset_view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Returns the dataset specified by datasetID. # IAM Permissions Requires the
bigquery.datasets.get permission on the dataset.
133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 133 def get_dataset(project_id, dataset_id, access_policy_version: nil, dataset_view: nil, fields: nil, quota_user: 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['accessPolicyVersion'] = access_policy_version unless access_policy_version.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. # IAM Permissions Requires the
bigquery.jobs.get permission on the job resource. If the user matches the
creator of the job, the bigquery.jobs.create permission on the project is
required instead.
519 520 521 522 523 524 525 526 527 528 529 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 519 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}', ) 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_timestamp_output_format: nil, 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. # IAM Permissions Requires the
following IAM permission(s) to use this method: - bigquery.jobs.get on the
job. - bigquery.tables.getData on the destination table. If the user matches
the creator of the job, the following IAM permission(s) are required instead: -
bigquery.jobs.create on the project. - bigquery.tables.getData on the
destination table.
587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 587 def get_job_query_results(project_id, job_id, format_options_timestamp_output_format: nil, 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}', ) 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.timestampOutputFormat'] = unless .nil? command.query['formatOptions.useInt64Timestamp'] = unless .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. # IAM Permissions Requires the
bigquery.models.getMetadata permission on the model.
826 827 828 829 830 831 832 833 834 835 836 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 826 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}', ) 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. Requires the bigquery.jobs.create permission on the project
resource. This permission is required to authorize the retrieval of the
project's service identity for technical management tasks like encryption
configuration.
945 946 947 948 949 950 951 952 953 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 945 def get_project_service_account(project_id, fields: nil, quota_user: 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? 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. # IAM Permissions Requires
the bigquery.routines.get permission on the routine.
1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1061 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}', ) 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.
1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1098 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', ) 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(project_id, dataset_id, table_id, policy_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Gets the specified row access policy by policy ID. # IAM Permissions Requires
the bigquery.rowAccessPolicies.get permission on the table.
1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1427 def get_row_access_policy(project_id, dataset_id, table_id, policy_id, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:get, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies/{+policyId}', ) command.response_representation = Google::Apis::BigqueryV2::RowAccessPolicy::Representation command.response_class = Google::Apis::BigqueryV2::RowAccessPolicy 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.params['policyId'] = policy_id unless policy_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_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.
1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1464 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', ) 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. # IAM Permissions Requires the bigquery.tables.get
permission on the table.
1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1819 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}', ) 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.
1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1857 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', ) 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. # IAM Permissions Requires the following IAM permission(s) to use this
method: - bigquery.tables.updateData on the table. - bigquery.tables.get
on the table. - bigquery.datasets.get on the dataset.
1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1672 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', ) 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, access_policy_version: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::Dataset
Creates a new empty dataset. # IAM Permissions Requires the bigquery.datasets.
create permission on the project.
180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 180 def insert_dataset(project_id, dataset_object = nil, access_policy_version: nil, fields: nil, quota_user: 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['accessPolicyVersion'] = access_policy_version unless access_policy_version.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. # IAM
Permissions Requires the bigquery.jobs.create permission on the project
resource. Additional permissions are required depending on the job type: - **
Load, Export, and Copy jobs*: Generally require data-level permissions such
as bigquery.tables.export or access to external storage. - **Query jobs*:
Permissions are dependent on the SQL statement. Complex queries (DDL, DCL) may
require additional permissions to create reservations, modify IAM policies, or
update project settings.
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 642 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', ) 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? 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. # IAM Permissions Requires the bigquery.
routines.create permission on the dataset.
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1134 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', ) 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_row_access_policy(project_id, dataset_id, table_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Creates a row access policy. # IAM Permissions Requires the following IAM
permission(s) on the table: - bigquery.rowAccessPolicies.create - bigquery.
rowAccessPolicies.setIamPolicy - bigquery.tables.getData
1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1503 def insert_row_access_policy(project_id, dataset_id, table_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies', ) command.request_representation = Google::Apis::BigqueryV2::RowAccessPolicy::Representation command.request_object = row_access_policy_object command.response_representation = Google::Apis::BigqueryV2::RowAccessPolicy::Representation command.response_class = Google::Apis::BigqueryV2::RowAccessPolicy 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_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. # IAM Permissions Requires the
bigquery.tables.create permission on the dataset.
1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1893 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', ) 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. # IAM Permissions Requires no specific IAM permission(
s) to use this method. Results are filtered to only include datasets on which
the caller has the bigquery.datasets.get permission.
229 230 231 232 233 234 235 236 237 238 239 240 241 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 229 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', ) 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. #
IAM Permissions Requires no specific IAM permission(s) to use this method.
Users are able to list the jobs they created. Additional access is granted
based on the following permissions: - Users with the bigquery.jobs.listAll
permission can list all jobs with all metadata. - Users with the bigquery.
jobs.list permission can list all jobs, but with redacted information for
jobs they did not create.
709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 709 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', ) 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. # IAM Permissions Requires
the bigquery.models.list permission on the dataset.
868 869 870 871 872 873 874 875 876 877 878 879 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 868 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', ) 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. # IAM Permissions Requires no specific IAM permission(s) to use this method. The results are filtered to only include projects on which the caller has been granted a project-level role such as a BigQuery predefined IAM role or a basic role such as Viewer or Owner.
987 988 989 990 991 992 993 994 995 996 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 987 def list_projects(max_results: nil, page_token: nil, fields: nil, quota_user: 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? 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.
IAM Permissions Requires the bigquery.routines.list permission on the
dataset.
1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1185 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', ) 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. # IAM Permissions
Requires the bigquery.rowAccessPolicies.list permission on the table.
1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1547 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', ) 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_timestamp_output_format: nil, 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. # IAM Permissions Requires the bigquery.
tables.getData permission on the table.
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1728 def list_table_data(project_id, dataset_id, table_id, format_options_timestamp_output_format: nil, 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', ) 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.timestampOutputFormat'] = unless .nil? command.query['formatOptions.useInt64Timestamp'] = unless .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. #
IAM Permissions Requires the bigquery.tables.list permission on the dataset.
1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1934 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', ) 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, access_policy_version: nil, update_mode: 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. # IAM Permissions Requires the following IAM permission(s) to
use this method: - bigquery.datasets.update on the dataset. - bigquery.
datasets.get on the dataset.
288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 288 def patch_dataset(project_id, dataset_id, dataset_object = nil, access_policy_version: nil, update_mode: nil, fields: nil, quota_user: 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['accessPolicyVersion'] = access_policy_version unless access_policy_version.nil? command.query['updateMode'] = update_mode unless update_mode.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. # IAM Permissions Requires the
bigquery.models.updateMetadata permission on the model.
907 908 909 910 911 912 913 914 915 916 917 918 919 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 907 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}', ) 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. # IAM Permissions Requires the following IAM permission(s) on the
table: - bigquery.tables.update - bigquery.tables.get
1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1978 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}', ) 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. # IAM Permissions Requires the bigquery.
jobs.create permission on the project resource. Data-level permissions are
highly dependent on the SQL statement being executed. While standard queries
require data access (such as bigquery.tables.getData), complex operations
like DDL or DCL may require permissions to manage reservations, IAM policies,
or project settings.
754 755 756 757 758 759 760 761 762 763 764 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 754 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', ) 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.
1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1225 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', ) 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.
2018 2019 2020 2021 2022 2023 2024 2025 2026 2027 2028 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 2018 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', ) 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_routine_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.
1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1264 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, '{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation command.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_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.
1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1588 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, '{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation command.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.
2057 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 2057 def (resource, = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:post, '{+resource}:testIamPermissions', ) command.request_representation = Google::Apis::BigqueryV2::TestIamPermissionsRequest::Representation command.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. # IAM Permissions Requires the
following IAM permission(s) to use this method: - bigquery.datasets.create
on the project. - bigquery.datasets.get on the dataset.
330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 330 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', ) 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, access_policy_version: nil, update_mode: 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. # IAM Permissions Requires the
bigquery.datasets.update permission on the dataset.
386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 386 def update_dataset(project_id, dataset_id, dataset_object = nil, access_policy_version: nil, update_mode: nil, fields: nil, quota_user: 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['accessPolicyVersion'] = access_policy_version unless access_policy_version.nil? command.query['updateMode'] = update_mode unless update_mode.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. # IAM Permissions Requires the bigquery.routines.
update permission on the routine.
1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1303 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}', ) 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_row_access_policy(project_id, dataset_id, table_id, policy_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::BigqueryV2::RowAccessPolicy
Updates a row access policy. # IAM Permissions Requires the following IAM
permission(s) on the table: - bigquery.rowAccessPolicies.update - bigquery.
rowAccessPolicies.setIamPolicy - bigquery.tables.getData
1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 1629 def update_row_access_policy(project_id, dataset_id, table_id, policy_id, row_access_policy_object = nil, fields: nil, quota_user: nil, options: nil, &block) command = make_simple_command(:put, 'projects/{+projectId}/datasets/{+datasetId}/tables/{+tableId}/rowAccessPolicies/{+policyId}', ) command.request_representation = Google::Apis::BigqueryV2::RowAccessPolicy::Representation command.request_object = row_access_policy_object command.response_representation = Google::Apis::BigqueryV2::RowAccessPolicy::Representation command.response_class = Google::Apis::BigqueryV2::RowAccessPolicy 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.params['policyId'] = policy_id unless policy_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. # IAM Permissions Requires the
bigquery.tables.update permission on the table.
2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 |
# File 'lib/google/apis/bigquery_v2/service.rb', line 2099 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}', ) 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 |