ruseel
ruseel

Reputation: 1734

BigQuery - nodejs library table.insert() is calling API insertAll?

I am trying to do streaming insert with nodejs library google-cloud/bigquery.

Official Documents in GoogleCloudBigQuery said

you can choose to stream your data into BigQuery one record at a time by using the tabledata().insertAll() method

And in that document, Streaming insert examples section shows code.

bigquery
  .dataset(datasetId)
  .table(tableId)
  .insert(rows)

Is this code calling API tabledata().insertAll() method eventually?

Upvotes: 1

Views: 6369

Answers (2)

dsesto
dsesto

Reputation: 8177

As you will be able to see in the BigQuery Node.js client library documentation for the Table().insert() method, it indeed is used for running Streaming Inserts to BigQuery.

The alternative approach for loading data into BigQuery (BigQuery Load) can be used with the Table().load() method.

Whenever you have any similar doubt in the future, I recommend you to visit the client library reference page for the corresponding language, where you will be able to find detailed documentation and examples for the different methods available in each of the programming languages.

Upvotes: 4

ruseel
ruseel

Reputation: 1734

In library's source code It seems to use tabledata().insertAll() method

Upvotes: 0

Related Questions