Google IoTCore support several ways to consume data.

Google Cloud SDK


Google provide you with a client libraries for all major languages to push and pull data from Pub/Sub see the llink for more information: https://cloud.google.com/sdk/docs/


Google Cloud Services


Google IoTCore has full integration with all major Google Cloud services, in this section we will focus on how to push data to BigQuery


  1. Go to the cloud storage service.

2. Create a new bucket.

3. Give the bucket a name and hit "Create" (this bucket will be used by the DataFlow service to export IoTCore data to BigQuery)


4.Create a temp folder in this bucket.


5. Open the BigQuery service (in the left panel), select your resource (on the left menu), then create a dataset.


6. Give it a name and click on "Create"


7. Select the dataset on the left and create a table.


8. Give the table a name and add these columns (those are json fields of the message sent by niagara).


9. Now go to the pub/sub service.

10. Choose the topic you want to export to BigQuery.


11. Hit Export to BigQuery.


12. Now in the DataFlow

  • Give a name to the job
  • Choose a region where the data pipeline will be created
  • Under "BigQuery output table" set your table path
  • Under Temporary location set the path of the folder we created before on storage service. 
  • Then start the job: Example: gs://iotcore-data/temp


13. Type the query below in the query console and run it, you should see your data.


Tips



  • To visualize your data click on the button EXPLORE WITH DATA STUDIO (between the query editor and the console with the results)

  • To prepare, clean and transform your data you can use a Dataprep service (ETL service).