Skip to content

Commit

Permalink
Add documentation for creating BigQuery tables and views
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonthomas committed May 16, 2019
1 parent f738adc commit 6326b43
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/cookbooks/bigquery.md
Expand Up @@ -159,6 +159,22 @@ ORDER BY

Check out the [BigQuery Standard SQL Functions & Operators](https://cloud.google.com/bigquery/docs/reference/standard-sql/functions-and-operators) for detailed documentation.

### Writing query results to a permanent table

You can write query results to a BigQuery table you have access via [GCP BigQuery Console](bigquery.md#gcp-bigquery-console) or [GCP BigQuery API Access](bigquery.md#gcp-bigquery-api-access)

- Use `moz-fx-data-derived-datasets.analysis` dataset.
- Prefix your table with your username. If your username is `username@mozilla.com` create a table with `username_my_table`.
- See [Writing query results](https://cloud.google.com/bigquery/docs/writing-results) documentation for detailed steps.

### Creating a View
You can create views in BigQuery if you have access via [GCP BigQuery Console](bigquery.md#gcp-bigquery-console) or [GCP BigQuery API Access](bigquery.md#gcp-bigquery-api-access).

- Use `moz-fx-data-derived-datasets.analysis` dataset.
- Prefix your view with your username. If your username is `username@mozilla.com` create a table with `username_my_view`.
- See [Creating Views](https://cloud.google.com/bigquery/docs/views) documentation for detailed steps.


# Query Optimizations

To improve query performance and minimize the cost associated with using BigQuery please see the following query optimizations:
Expand Down

0 comments on commit 6326b43

Please sign in to comment.