|
| 1 | +--- |
| 2 | +title: Google BigQuery |
| 3 | +--- |
| 4 | + |
| 5 | +Overture data is accessible in Google BigQuery as part of the [Google Cloud Public Dataset Program](https://cloud.google.com/bigquery/public-data), with the data being listed and maintained by [CARTO](https.//www.carto.com). |
| 6 | + |
| 7 | + |
| 8 | +<img |
| 9 | + src="../../static/img/getting-data/BigQuery-1.png" |
| 10 | + alt="Overture data in Google Cloud" |
| 11 | + width="900" |
| 12 | + height="auto" |
| 13 | +/> |
| 14 | + |
| 15 | + |
| 16 | +Below is a step-by-step guide on how to access and use Overture data in BigQuery: |
| 17 | + |
| 18 | +## Before you begin |
| 19 | + |
| 20 | +To get started using Overture data in BigQuery, you must create or select a Google Cloud project with billing [enabled](https://cloud.google.com/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project). BigQuery is automatically enabled in new projects, but in order to activate it in a preexisting project, you should enable the [BigQuery API](https://console.cloud.google.com/apis/enableflow?apiid=bigquery&inv=1&invt=Abns8w). |
| 21 | + |
| 22 | +## Getting Overture Data in Google BigQuery |
| 23 | +1. Log in to your [Google Cloud Console](https://console.cloud.google.com/). |
| 24 | +2. Navigate to the **BigQuery** section by selecting `BigQuery` from the side menu or searching for it in the search bar. |
| 25 | + |
| 26 | + |
| 27 | +<img |
| 28 | + src="../../static/img/getting-data/bigquery-2.png" |
| 29 | + alt="Overture data in Google Cloud" |
| 30 | + width="900" |
| 31 | + height="auto" |
| 32 | +/> |
| 33 | + |
| 34 | + |
| 35 | +3. In the BigQuery console, click **Add Data**. Then, click on **Public Datasets**. |
| 36 | + |
| 37 | + |
| 38 | +<img |
| 39 | + src="../../static/img/getting-data/bigquery-4.png" |
| 40 | + alt="Overture data in Google Cloud" |
| 41 | + width="900" |
| 42 | + height="auto" |
| 43 | +/> |
| 44 | + |
| 45 | + |
| 46 | +4. The Google Cloud data marketplace will open. In the search box look for **Overture Maps**. |
| 47 | + |
| 48 | + |
| 49 | +<img |
| 50 | + src="../../static/img/getting-data/bigquery-5.png" |
| 51 | + alt="Overture data in Google Cloud" |
| 52 | + width="900" |
| 53 | + height="auto" |
| 54 | +/> |
| 55 | + |
| 56 | + |
| 57 | +5. Select the **Overture Maps Data** listing. Then, click on **View dataset**. |
| 58 | + |
| 59 | + |
| 60 | +<img |
| 61 | + src="../../static/img/getting-data/bigquery-6.png" |
| 62 | + alt="Overture data in Google Cloud" |
| 63 | + width="900" |
| 64 | + height="auto" |
| 65 | +/> |
| 66 | + |
| 67 | + |
| 68 | +6. Back again in the BigQuery console you will see the `bigquery-public-data` project and the `overture_maps`dataset selected. |
| 69 | + |
| 70 | + |
| 71 | +<img |
| 72 | + src="../../static/img/getting-data/bigquery-7.png" |
| 73 | + alt="Overture data in Google Cloud" |
| 74 | + width="900" |
| 75 | + height="auto" |
| 76 | +/> |
| 77 | + |
| 78 | + |
| 79 | +7. Our recommendation is that you add the `overture_maps` dataset or entirely the `bigquery-public-data` project in your starred selection in order to have access to the Overture data always at hand. |
| 80 | + |
| 81 | + |
| 82 | +<img |
| 83 | + src="../../static/img/getting-data/bigquery-8.png" |
| 84 | + alt="Overture data in Google Cloud" |
| 85 | + width="900" |
| 86 | + height="auto" |
| 87 | +/> |
| 88 | + |
| 89 | + |
| 90 | +## Working with Overture Data in BigQuery |
| 91 | + |
| 92 | +8. Now that Overture Maps data is available in your BigQuery console, you can start using it. Note that in the `overture_maps` dataset you have access to all tables from all the different Overture Maps themes: Addresses, Base, Buildings, Divisions, Places and Transporatation. |
| 93 | + |
| 94 | + |
| 95 | +<img |
| 96 | + src="../../static/img/getting-data/bigquery-9.png" |
| 97 | + alt="Overture data in Google Cloud" |
| 98 | + width="900" |
| 99 | + height="auto" |
| 100 | +/> |
| 101 | + |
| 102 | + |
| 103 | +9. The release version is detailed as a `label` in each of the tables. You can check it out in the **Details** section of each table. |
| 104 | + |
| 105 | + |
| 106 | +<img |
| 107 | + src="../../static/img/getting-data/bigquery-10.png" |
| 108 | + alt="Overture data in Google Cloud" |
| 109 | + width="900" |
| 110 | + height="auto" |
| 111 | +/> |
| 112 | + |
| 113 | + |
| 114 | +10. You can now query any of the tables directly from your SQL Editor in BigQuery. Here's one example for the Places data in Overture Maps. |
| 115 | + |
| 116 | + |
| 117 | +<img |
| 118 | + src="../../static/img/getting-data/bigquery-11.png" |
| 119 | + alt="Overture data in Google Cloud" |
| 120 | + width="900" |
| 121 | + height="auto" |
| 122 | +/> |
| 123 | + |
| 124 | + |
| 125 | +```sql |
| 126 | +// Identify places within the "Restaurant" category |
| 127 | +SELECT id, phones.list[0].element AS phone, names.primary AS name |
| 128 | +FROM `bigquery-public-data.overture_maps.place` |
| 129 | +WHERE categories.primary = "restaurant" |
| 130 | +LIMIT 100; |
| 131 | +``` |
| 132 | + |
| 133 | +## Additional Notes |
| 134 | + |
| 135 | +- **Updates**: CARTO regularly updates the Overture datasets in BigQuery and keeps the dataset synced with the last release. You can check the release version of the data as a metadata label in each table. |
| 136 | +- **Support **: If you encounter issues accessing the data, contact CARTO support via [email protected]. |
| 137 | +- **CARTO**: Once you have the Overture data you need in BigQuery, you can use CARTO's cloud-native spatial analytics platform running on your BigQuery account to build interactive maps, data procesing and analytical workflows or geospatial applications. Not yet on CARTO? Open a 14-day free trial [here](https://www.carto.com/signup). |
0 commit comments