Instructions for the Google Bigquery App Engine Dashboard Sample
Browse Source Code
Register Your Application
- Visit the Google apis
console
- If this is your first time, click "Create project..."
- Otherwise, click on the drop down under the "Google apis" logo at the top left,
and click "Create..." under "Other projects".
- Click on "API Access", and then on "Create an OAuth 2.0 Client
ID...".
- Enter a product name and click "Next".
- Select "Web application", select "more options" and enter some
redirect URIs, for example
"https://yourappname.appspot.com/oauth2callback" and
"http://localhost:8888/oauth2callback". Click "Create client ID".
- In the newly created "Client ID for web applications", click
"Download JSON" on the right side. Later on after you check out the
sample project, you will copy this downloaded file (e.g.
~/Downloads/client_secrets.json)
to src/main/resources/client_secrets.json.
Otherwise you would get a 400 INVALID_CLIENT error in
the browser when running the sample.
Checkout Instructions
Prerequisites: install Java 6, Google App Engine,
Mercurial,
and Maven. You may
need to set your
JAVA_HOME
.
cd [someDirectory]
hg clone https://code.google.com/p/google-api-java-client.samples/ google-api-java-client-samples
cd google-api-java-client-samples/bigquery-appengine-sample
cp ~/Downloads/client_secrets.json src/main/resources/client_secrets.json
mvn clean package
To enable logging of HTTP requests and responses (highly recommended
when developing), please take a look at logging.properties.
Setup Project in Eclipse
Prerequisites: install Eclipse,
Google Plugin for Eclipse, and
the Mercurial plugin.
- Setup Eclipse Preferences
- Window > Preferences... (or on Mac, Eclipse >
Preferences...)
- Select Maven
- check on "Download Artifact Sources"
- check on "Download Artifact JavaDoc"
- Import
bigquery-appengine-sample project
- File > Import...
- Select "General > Existing Project into Workspace" and click
"Next"
- Click "Browse" next to "Select root directory", find
[someDirectory]/google-api-java-client-samples/bigquery-appengine-sample
and click "Next"
- Click "Finish"
- NOTE: please ignore the "The App Engine SDK JAR * is missing in
the WEB-INF/lib directory" error messages.
- Run
- Right-click on project bigquery-appengine-sample
- Run As > Web Application
FAQ
- I keep getting redirected to /denied! What do I do?
Make sure
your client secret/ID are correctly set and that you re-installed
samples/shared-sample-appengine.
- I get a 403 Forbidden when trying to run my query. What causes
this?
The user who is trying to run the query has to be added as a
team member to the project in the API console in order to access the data
associated with the project.
- I get a 404 when I run my query. What could be wrong?
Make
sure you've added your API Console project ID to the appengine-web.xml.