Database Reference
In-Depth Information
SDK described below requires Python version 2.7.x and the samples in the
book have been tested with this version, so the link is for that specific
version. If you have multiple versions of Python installed, ensure that your
python command is referring to the appropriate version. On Mac OS X,
for example, the version distributed with the OS is located at /usr/bin/
python and the one set up by the Python installer is located at /usr/
local/bin/python . Adding an alias to your shell initialization script
allows you to directly use the commands that follow without specifying the
full path.
alias python=/usr/local/bin/python
The code for the BigQuery client is open source and is hosted at
https://code.google.com/p/google-bigquery-tools/ . The
client is distributed as part of the Google Cloud SDK, which is available
at https://developers.google.com/cloud/sdk/ . The SDK site has
platform specific installations. Since the details of the installation are likely
to change over time, we have not reproduced those instructions here. You
will be given the option of installing a language-specific Google AppEngine
SDK. If you want to try the AppEngine examples in this topic, you should
select the Python option. The installation script will ask if it should modify
your PATH environment variable to include the SDK bin directory. If you
skip this step you will need to manually add:
<install directory>/google-cloud-sdk/bin
to your path because the examples use the tools in this directory. Once
you are done with the installation, launch a new terminal so that your
environment is updated.
With the tools set up, you need to configure them with the Google account to
use when talking to the service. It uses the installed client OAuth flow, which
requires that you use a browser to complete authentication. You initiate the
setup by running:
$ gcloud auth login
Your browser has been opened to visit:
https://accounts.google.com/o/oauth2
/auth?scope=https%3A%2F%2Fwww.googleapis>
Search WWH ::




Custom Search