This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcloud config set project example | |
gcloud config set compute/zone europe-west1-d | |
gcloud container clusters create my-cluster --num-nodes 1 --machine-type g1-small | |
gcloud container clusters get-credentials my-cluster --zone europe-west1-d --project example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#standardSQL | |
-- Create temporary function to calculate | |
-- acurracy of Common Air Quality Index calculation | |
-- There are six pollutants in total. If all pollutant readings | |
-- are available then accuracy is 100%. | |
-- The less pollutant readings there are the worse the CAQI calculation accuracy is. | |
-- This function takes in an array of sensor readings and returns single FLOAT64 | |
CREATE TEMPORARY FUNCTION getCAQIAccuracy ( | |
sensor_reading ARRAY<STRUCT<pollutant STRING, value FLOAT64>> | |
) |