Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Unified Diff: tools/android/loading/cloud/frontend/README.md

Issue 2024953006: tools/android/loading Improve BigQuery template documentation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/android/loading/cloud/frontend/README.md
diff --git a/tools/android/loading/cloud/frontend/README.md b/tools/android/loading/cloud/frontend/README.md
index df66330611d423d7619e9f7791ba12134a4f113d..e6fd69c1e8fc109260ce6e562f97a16a6fc22ab7 100644
--- a/tools/android/loading/cloud/frontend/README.md
+++ b/tools/android/loading/cloud/frontend/README.md
@@ -53,8 +53,7 @@ Finds all the traces in the specified bucket and generates a report in BigQuery.
This requires an existing `clovis_dataset.report` BigQuery table that will be
used as a template. The schema of this template is not updated automatically and
must match the format of the report (as generated by `report.py`).
-To update the schema manually, delete and recreate the `clovis_dataset.report`
-from the BigQuery web interface as an empty table with the new schema.
+See [how to update the schema manually][7].
## Development
@@ -127,7 +126,8 @@ gcloud preview app deploy app.yaml
When a change is made to the dictionary returned by report.py, the BigQuery
database schema must be updated accordingly.
-Then, to actually update the schema, run:
+
+To update the schema, run:
```shell
bq update \
@@ -138,6 +138,16 @@ bq update \
Adding a new field is harmless, but don't modify existing ones.
+If the above command does not work, this is probably because you are doing more
+than adding fields.
+In this case, you can delete and recreate the `clovis_dataset.report` table from
+the [BigQuery web interface][8]:
+- Expand `clovis_dataset` from the left menu, and delete the `report` table.
+- Create a new table in `clovis_dataset`, and call it `report`.
+- Set `Location` to `None` in order to create an empty table.
+- Click `Edit as Text` in the `Schema` section , and paste the contents of
+ `bigquery_schema.json` there.
+
[1]: https://cloud.google.com/sdk
[2]: https://cloud.google.com/appengine/docs/python/taskqueue
@@ -145,3 +155,5 @@ Adding a new field is harmless, but don't modify existing ones.
[4]: ../backend/README.md#Deploy-the-code
[5]: https://cloud.google.com/appengine/docs/python
[6]: http://flask.pocoo.org
+[7]: #Updating-the-Database-Schema
+[8]: https://bigquery.cloud.google.com
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698