Skip to content

Value in range numerical percent

In this example - check the data of bigquery-public-data.covid19_italy.data_by_region using value_in_range_numerical_percent check. The goal is to set up a validity check on the recovered column in order to check how many percent of data is in range. In this case, check how many people from Sicilia recovered in range [0-500], and how many of these observations are part of the total data.

Adding connection

GCP

Download and install Google Cloud CLI. After installing Google Cloud CLI, log in to your GCP account (you can start one for free), by running:

gcloud auth application-default login

After setting up the GCP account, create a GCP project. That will be the GCP billing project used to run SQL sensors on the public datasets provided by Google.

The examples are using a name of the GCP billing project, received as an environment variable GCP_PROJECT. Set and export this variable before starting DQO shell.

set GCP_PROJECT={here is your GCP billing project}
export GCP_PROJECT={here is your GCP billing project}
export GCP_PROJECT={here is your GCP billing project}

Navigate to the example directory and run the check

cd examples\bigquery-column-value-in-range-numerical-percent
..\..\dqo.cmd
cd examples/bigquery-column-value-in-range-numerical-percent
../../dqo
cd examples/bigquery-column-value-in-range-numerical-percent
../../dqo

After starting the example, run the following commands in the DQO shell:

cloud login
This command will let up login or sign up for the cloud.dqo.ai account.

check run
The data quality checks will be executed.
cloud sync

The result files will be pushed to cloud.dqo.ai

Now, you can open the browser and navigate to https://cloud.dqo.ai/ and review the sensor results on the dashboards.