
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Create a lake, zone, and asset
/ 20
Query BigQuery table to review data quality
/ 20
Create and upload a data quality specification file
/ 20
Define and run a data quality job
/ 20
Review data quality results in BigQuery
/ 20
Dataplex Universal Catalog is an intelligent data fabric that enables organizations to centrally discover, manage, monitor, and govern their data across data lakes, data warehouses, and data marts to power analytics at scale.
A valuable feature of Dataplex Universal Catalog is the ability to define and run data quality checks on Dataplex Universal Catalog assets such as BigQuery tables and Cloud Storage files. Using Dataplex data quality tasks, you can integrate data quality checks into everyday workflows by validating data that is part of a data production pipeline, regularly monitoring the quality of your data against a set of criteria, and building data quality reports for regulatory requirements.
In this lab, you learn how to assess data quality using Dataplex Universal Catalog by creating a custom data quality specification file and using it to define and run a data quality job on BigQuery data.
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
Click the Start Lab button. If you need to pay for the lab, a dialog opens for you to select your payment method. On the left is the Lab Details pane with the following:
Click Open Google Cloud console (or right-click and select Open Link in Incognito Window if you are running the Chrome browser).
The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Arrange the tabs in separate windows, side-by-side.
If necessary, copy the Username below and paste it into the Sign in dialog.
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
You can also find the Password in the Lab Details pane.
Click Next.
Click through the subsequent pages:
After a few moments, the Google Cloud console opens in this tab.
Cloud Shell is a virtual machine that is loaded with development tools. It offers a persistent 5GB home directory and runs on the Google Cloud. Cloud Shell provides command-line access to your Google Cloud resources.
Click Activate Cloud Shell at the top of the Google Cloud console.
Click through the following windows:
When you are connected, you are already authenticated, and the project is set to your Project_ID,
gcloud
is the command-line tool for Google Cloud. It comes pre-installed on Cloud Shell and supports tab-completion.
Output:
Output:
gcloud
, in Google Cloud, refer to the gcloud CLI overview guide.
In the Google Cloud console title bar, enter Cloud Dataproc API in the Search field and then click Cloud Dataproc API from the search results.
Click Enable if it isn't already enabled.
To define and run data quality tasks, you need some Dataplex Universal Catalog resources.
In this task, you create a new Dataplex Universal Catalog lake to store ecommerce customer information, add a raw zone to the lake, and then attach a pre-created BigQuery dataset as a new asset in the zone.
If prompted Welcome to the new Dataplex Universal Catalog experience
, click Close.
Under Manage lakes, click Manage.
Click Create lake.
Enter the required information below to create a new lake. Leave all other fields as the default values:
Property | Value |
---|---|
Display Name | Ecommerce Lake |
Region |
It can take up to 3 minutes for the lake to be created.
On the Manage tab, click the name of your lake.
Click ADD ZONE.
Enter the required information below to create a new zone. Leave all other fields as the default values:
Property | Value |
---|---|
Display Name | Customer Contact Raw Zone |
Type | Raw zone |
Data locations | Regional |
It can take up to 2 minutes for the zone to be created.
On the Zones tab, click Customer Contact Raw Zone.
On the Assets tab, click Add Asset.
Click Add an asset.
Enter the required information below to attach a new asset. Leave other fields as the default values.
Property | Value |
---|---|
Type | BigQuery dataset |
Display Name | Contact Info |
Dataset |
Click Done.
Click Continue.
For Discovery settings, select Inherit to inherit the Discovery settings from the zone level, and then click Continue.
Click Submit.
Click Check my progress to verify the objective.
This lab uses two pre-created BigQuery datasets:
customers: Contains one table named contact_info, which contains contact information for customers such as a customer ID, name, email, and more. This is the table that you explore and check for data quality issues throughout this lab.
customers_dq_dataset: Does not contain any tables. When you define a data quality job in a later task, you use this dataset as the destination for a new table containing the data quality job results.
In this task, you query the customers dataset to identify data quality issues to include as checks in a data quality job. You also specify the customers_dq_dataset dataset to store data quality job results in a later task.
The Welcome to BigQuery in the Cloud Console message box opens. This message box provides a link to the quickstart guide and the release notes.
The BigQuery console opens.
You should see the three datasets:
This query selects 50 records from the original table and orders the records by the customer id in the results.
Scroll through the results in the Results pane.
Notice that some records are missing customer IDs or have incorrect emails, which can make it difficult to manage customer orders.
Click Check my progress to verify the objective.
Dataplex data quality check requirements are defined using the CloudDQ YAML specification files. Once created, the YAML specification file is uploaded to a Cloud Storage bucket that is made accessible to the data quality job.
The YAML file has four keys sections:
In this task, you define a new YAML specification file for data quality checks that identify null customer IDs and emails in the specified BigQuery table. You also specify a pre-created BigQuery dataset named customer_dq_dataset to store the data quality results in a table named dq_results.
After you define the file, you upload it to a pre-created Cloud Storage bucket for use in a later task to run the data quality job.
The dq-customer-raw-data.yaml
specifies two rules:
In this file, the two rules are bound to specific table columns:
CTRL+X
, then Y
, to save and close the file.Click Check my progress to verify the objective.
The data quality process uses a data quality specification YAML file to run a data quality job and generates data quality metrics that are written to a BigQuery dataset.
In this task, you define and run an auto data quality job using the data quality specification YAML file in Cloud Storage. When you define the job, you also specify the customer_dq_dataset dataset to store the data quality results.
Return to the console. You should still be in the Dataplex Universal Catalog.
Under Govern, click Data profiling & quality.
Click customer-orders-data-quality-job.
Click Run Now.
Once the job is complete, notice that it's status is 1 dimension 1 rule failed.
Notice that data quality rule for the email column is Passed, but for the id column, it is Failed. This is expected because:
The rule for the id column is a Null Check
with a threshold of 100%
. This means that for the rule to pass, all rows must have a value for the id. In this case, 10%
rows of id column of the contact_info table are having null
values. Hence, this rule is getting Failed.
The rule for the email column is a Regex Check
with a threshold of 85%
. This means that the rule will fail, if 15%
of the records have an invalid email format. In this case, ~10.5%
rows of email column of the contact_info table are having invalid email. Hence this rule is getting Passed.
Click Check my progress to verify the objective.
In this task, you review the tables in the customers_dq_dataset to identify records that are missing customer ID values or have an invalid values for emails.
Return to BigQuery, and in the Explorer pane, expand the arrow next to your project ID to list the contents:
Click the expander arrow next to the customer_dq_dataset dataset.
Click the dq_results table.
Click the Preview tab to see the results.
Scroll to the column named rule_failed_records_query.
Copy the query, it starts with WITH
.
Click SQL query (+). Copy and paste the query into the SQL Editor and click Run.
The results of the query provide the email values in the contact_info table that are not valid. Notice "email" in each entry in the dq_validation_column_id column.
Repeat steps 7-8 for the second cell that contains the query for the VALID_CUSTOMER rule results.
The results of the query identify that there are 10 records in the contact_info table that are missing ID values.
Notice "id" in each entry in the dq_validation_column_id column.
Click Check my progress to verify the objective.
You assessed data quality using Dataplex Universal Catalog by creating a custom data quality specification file and using it to run a data quality job on a BigQuery table.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated September 02, 2025
Lab Last Tested September 02, 2025
Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one