module BigQuery::Tabledata

Public Instance Methods

insert(table, arg) click to toggle source
# File lib/bigquery-client/tabledata.rb, line 5
def insert(table, arg)
  InsertRows.new(self, table, arg).call
end
insert_all(table, rows) click to toggle source
# 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) click to toggle source
# File lib/bigquery-client/tabledata.rb, line 21
def list_tabledata(table)
  access_api(
    api_method: bigquery.tabledata.list,
    parameters: {
      tableId: table
    }
  )
end