This page shows how to get started with the new Cloud Client Libraries for the Google BigQuery API. Read more about the client libraries for Cloud APIs, including the older Google APIs Client Libraries, in Client Libraries Explained.
Installing the client library
C#
Install-Package Google.Cloud.BigQuery.V2 -Pre
Go
go get -u cloud.google.com/go/bigquery
Java
If you are using Maven, add this to your pom.xml file:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-bigquery</artifactId>
<version>0.8.0-beta</version>
</dependency>
If you are using Gradle, add this to your dependencies:
compile group: 'com.google.cloud', name: 'google-cloud-bigquery', version: '0.8.0-beta'
Node.js
npm install --save @google-cloud/bigquery
PHP
composer require google/cloud
Python
pip install --upgrade google-cloud-bigquery
Ruby
gem install google-cloud-bigquery
Using the client library
Here's an example of how to use the client library. To run it on your local workstation you must first install the Google Cloud SDK and authenticate by running the following command:
gcloud beta auth application-default login
For information about authenticating in other environments, see the Google Cloud Platform Auth Guide.