Welcome to the hands-on lab, Viewing IoT Core Data Using BigQuery.
Google Cloud IoT Core is a fully managed service that manages and ingests data from millions of globally dispersed devices.
You will gain experience by using IoT Core to collect data from a single device. However, you can use the same configuration steps to collect data from millions of devices.
In this lab, we will:
1. Get hands-on with IoT Core to create a registry, add a device, and send simulated data from a compute engine VM.
2. Next, configure a Cloud DataFlow Template job to collect the data from a pub/sub topic, transform the data from JSON to table format, and store the data in BigQuery.
3. Finally, use BigQuery to query the data, sort it by the time collected, proving that you have configured the IoT Data Pipeline to move data from pub/sub using DataFlow, and store it in BigQuery in the correct format.
4. Optional: Export the data to Data Studio and display the heart rate data over time collected.
Successfully complete this lab by achieving the following learning objectives:
- Ingest the IoT Core data.
To complete this lab objective, you will need to perform the following tasks:
Create a Google Cloud IoT Core registry using following settings:
- Pub/sub topic name:
- Pub/sub subscription name:
Register a device in the IoT Core (VM instance). Use the following settings:
- Create the public/private key pair.
Send simulated data to the IoT Core device using the python heart rate simulator. Use the following settings:
<your project ID>
- private_key_file: =
- Build a Cloud Dataflow pipeline.
Create a BigQuery dataset and table:
- Dataset name:
- Table name:
- Dataset name:
Collect the endpoints for pub/sub subscription and Cloud Storage Bucket:
- BigQuery Table link
- Storage url
- Pub/sub subscription url
Send the Dataflow template and pub/sub subscription to Bigquery using the following endpoints:
- Dataflow job name
- BigQuery table information
- Pub/sub subscription link
- Storage Bucket location
- View our data in BigQuery.
Run a query to view the IoT data that was received in BigQuery.
Query the data to return the results sorted by
Optional: Export the results to Data Studio to create a dashboard graph.