lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.21.2 vs lib/google/cloud/bigquery/service.rb in google-cloud-bigquery-1.22.0

- old
+ new

@@ -136,10 +136,12 @@ execute backoff: true do service.list_tables @project, dataset_id, max_results: max, page_token: token end end + ## + # Gets the specified table resource by full table reference. def get_project_table project_id, dataset_id, table_id # The get operation is considered idempotent execute backoff: true do service.get_table project_id, dataset_id, table_id end @@ -149,14 +151,11 @@ # 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. def get_table dataset_id, table_id - # The get operation is considered idempotent - execute backoff: true do - get_project_table @project, dataset_id, table_id - end + get_project_table @project, dataset_id, table_id end ## # Creates a new, empty table in the dataset. def insert_table dataset_id, new_table_gapi @@ -248,19 +247,22 @@ json_txt = service.list_models @project, dataset_id, max_results: max, page_token: token, options: options JSON.parse json_txt, symbolize_names: true end end - # Gets the specified model resource by model ID. - # This method does not return the data in the model, - # it only returns the model resource, - # which describes the structure of this model. - def get_model dataset_id, model_id + # Gets the specified model resource by full model reference. + def get_project_model project_id, dataset_id, model_id # The get operation is considered idempotent execute backoff: true do - json_txt = service.get_model @project, dataset_id, model_id, options: { skip_deserialization: true } + json_txt = service.get_model project_id, dataset_id, model_id, options: { skip_deserialization: true } JSON.parse json_txt, symbolize_names: true end + end + + # Gets the specified model resource by model ID. This method does not return the data in the model, it only + # returns the model resource, which describes the structure of this model. + def get_model dataset_id, model_id + get_project_model @project, dataset_id, model_id end ## # Updates information in an existing model, replacing fields that # are provided in the submitted model resource.