Module: BigQuery::Tabledata
- Included in:
- Client
- Defined in:
- lib/bigquery-client/tabledata.rb,
lib/bigquery-client/insert_rows.rb
Defined Under Namespace
Classes: InsertRows
Instance Method Summary collapse
Instance Method Details
#insert(table, arg) ⇒ Object
5 6 7 |
# File 'lib/bigquery-client/tabledata.rb', line 5 def insert(table, arg) InsertRows.new(self, table, arg).call end |
#insert_all(table, rows) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/bigquery-client/tabledata.rb', line 9 def insert_all(table, rows) access_api( api_method: bigquery.tabledata.insert_all, parameters: { tableId: table }, body_object: { rows: rows.map { |row| { json: row } } } ) end |
#list_tabledata(table) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/bigquery-client/tabledata.rb', line 21 def list_tabledata(table) access_api( api_method: bigquery.tabledata.list, parameters: { tableId: table } ) end |