codybythesea codybythesea - 1 month ago 19
Python Question

Google BigQuery execute() method

I was looking at the Google BigQuery API reference sample Python code, and I came across the

execute()
call.

Can anyone provide me with documentation on what this call does?

Answer

You linked to code of the form:

bigquery.jobs().insert(...).execute();

The .jobs() call gets an object represent the BigQuery jobs collection.

The .insert(...) call creates a request object representing a (future) call to the BigQuery jobs.insert API method with the specified parameters. But note that this code only constructs the request--it does not actually send the request.

The .execute() call actually sends the API request to the BigQuery API and returns the response.

Note that this is an automatically-generated Java client library for the BigQuery API. The structure of these API clients is similar for all Google APIs.

Comments