Class: GoogleBigquery::TableData
- Defined in:
- lib/google_bigquery/table_data.rb
Instance Attribute Summary
Attributes inherited from Client
Class Method Summary collapse
- .create(project_id, dataset_id, table_id, body = {}) ⇒ Object
- .list(project_id, dataset_id, table_id) ⇒ Object
Methods inherited from Client
#defaults_options, #initialize, #parse_response, parse_response
Constructor Details
This class inherits a constructor from GoogleBigquery::Client
Class Method Details
.create(project_id, dataset_id, table_id, body = {}) ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/google_bigquery/table_data.rb', line 5 def self.create(project_id, dataset_id, table_id, body={}) res = GoogleBigquery::Auth.client.execute( :api_method=> GoogleBigquery::Auth.api.tabledata.insert_all, :body_object=> body , #{"datasetReference"=> {"datasetId" =>"whoa"}}, :parameters=> {"projectId"=> project_id, "datasetId"=> dataset_id, "tableId"=>table_id } ) parse_response(res) end |
.list(project_id, dataset_id, table_id) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/google_bigquery/table_data.rb', line 14 def self.list(project_id, dataset_id, table_id) res = GoogleBigquery::Auth.client.execute( :api_method=> GoogleBigquery::Auth.api.tabledata.list, :parameters=> {"projectId"=> project_id, "datasetId"=> dataset_id, "tableId"=>table_id } ) parse_response(res) end |