Module: BigQuery::Client::Insert

Included in:
BigQuery::Client
Defined in:
lib/big_query/client/load.rb

Instance Method Summary collapse

Instance Method Details

#load(opts) ⇒ Hash

Loads file content into a table

see developers.google.com/bigquery/loading-data-into-bigquery for possible opts

Parameters:

  • opts (Hash)

    field value hash to be inserted

Returns:

  • (Hash)


9
10
11
12
13
14
15
16
17
18
# File 'lib/big_query/client/load.rb', line 9

def load(opts)
  api(
    api_method: @bq.jobs.insert,
    body_object: {
      'configuration' => {
        'load' => opts
      }
    }
  )
end