—/100
Checkpoints
Create a dataset
/ 30
Copy a public New York taxi table to your dataset
/ 30
Create a tag template and attach the tag to your table
/ 40
Data Catalog: Qwik Start
GSP729
Overview
Data Catalog is a fully managed and scalable metadata management service that empowers organizations to quickly discover, understand, and manage all their data.
It offers a simple and easy-to-use search interface for data discovery, a flexible and powerful cataloging system for capturing both technical and business metadata, and a strong security and compliance foundation with Cloud Data Loss Prevention (DLP) and Cloud Identity and Access Management (IAM) integrations.
Google BigQuery is an enterprise data warehouse that enables super-fast SQL queries using the processing power of Google's infrastructure.
Simply move your data into BigQuery and let us handle the hard work. You can control access to both the project and your data based on your business needs, such as giving others the ability to view or query your data.
Using Data Catalog
There are two main ways you interact with Data Catalog:
-
Searching for data assets that you have access to.
-
Tagging assets with metadata.
Data Catalog use case
Imagine you are a data engineer in your company. It is your job to ensure all datasets can be easily discovered and used by colleagues, such as data scientists or business analysts. When a new dataset comes in, you annotate it with important information—this could be whether or not it contains PII data, who owns the dataset, how many rows the dataset contains, etc.
You can annotate this information by adding tags to your dataset and tables. Data Catalog allows you to create tag templates to let you define what kind of attributes you want to tag. This allows you to easily access, map, and discover pertinent information from your datasets and tables.
What you will learn
In this lab, you will learn how to:
-
Enable the Data Catalog API so that you can use this service in your Google Cloud project.
-
Create a dataset with BigQuery.
-
Copy a public New York Taxi table to your dataset.
-
Create a Data Catalog tag template.
-
Tag your newly created table with the newly created tags.
Prerequisites
Very Important: Before starting this lab, log out of your personal or corporate gmail account, or run this lab in Incognito. This prevents sign-in confusion while the lab is running.
Setup and requirements
Before you click the Start Lab button
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 will be made available to you.
This Qwiklabs hands-on lab lets you do the lab activities yourself in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials that you use to sign in and access Google Cloud for the duration of the lab.
What you need
To complete this lab, you need:
- Access to a standard internet browser (Chrome browser recommended).
- Time to complete the lab.
Note: If you already have your own personal Google Cloud account or project, do not use it for this lab.
Note: If you are using a Pixelbook, open an Incognito window to run this lab.
How to start your lab and sign in to the Google Cloud Console
-
Click the Start Lab button. If you need to pay for the lab, a pop-up opens for you to select your payment method. On the left is a panel populated with the temporary credentials that you must use for this lab.
-
Copy the username, and then click Open Google Console. The lab spins up resources, and then opens another tab that shows the Sign in page.
Tip: Open the tabs in separate windows, side-by-side.
-
In the Sign in page, paste the username that you copied from the Connection Details panel. Then copy and paste the password.
Important: You must use the credentials from the Connection Details panel. Do not use your Qwiklabs credentials. If you have your own Google Cloud account, do not use it for this lab (avoids incurring charges).
-
Click through the subsequent pages:
- Accept the terms and conditions.
- Do not add recovery options or two-factor authentication (because this is a temporary account).
- Do not sign up for free trials.
After a few moments, the Cloud Console opens in this tab.
Enable the Data Catalog API
From the navigation menu, select APIs and Services > Library.
In the search bar, enter in "Data Catalog" and select the first result.
Then click Enable.
If you run into the following error after trying to enable the Data Catalog API:
Click Close and refresh your browser tab. Then click Enable again. The Data Catalog API should be successfully enabled:
Open BigQuery Console
In the Google Cloud Console, select Navigation menu > BigQuery:
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.
Click Done.
The BigQuery console opens.
Create a dataset
In the left navigation pane of BigQuery, click your project name, then click CREATE DATASET.
In the Create Dataset dialog:
-
For Dataset ID, enter
demo_dataset
. -
For Data location, accept the Default location, which sets the dataset location to US multi-region.
-
For Default data expiration, choose Never.
Then click Create dataset.
Click Check my progress to verify the objective.
Copy a public New York Taxi table to your dataset.
From the left-hand panel, click + ADD DATA > Explore public datasets.
In the search bar, enter in NYC TLC Trips and click on the result that appears:
Then click View Dataset. This will open a new tab with the public dataset added to it. Close this tab.
Click outside of the infobox to return to your BigQuery Console (you should now be in your original BigQuery tab.)
Then Refresh your page. You should see the biqquery-public-data
project added to your list of resources:
Under the bigquery-public-data
project, select the new_york_taxi_trips
dataset, and then select the tlc_yellow_trips_2018
table.
Now click COPY TABLE to open the Table Details panel.
In the Copy table dialog "Destination" section, select your project and demo_dataset
.
Insert "trips" for the Table name and then click COPY:
Confirm that the trips table is listed in your demo_dataset
.
You will add Data Catalog tags to the table in the next section.
Click Check my progress to verify the objective.
Create a Data Catalog tag template
Create a tag template from the Data Catalog UI.
Open the Navigation menu and click on Data Catalog. Then click + CREATE > Create tag template:
Fill in the template form to define a "Demo Tag Template".
- Template display name: Demo Tag Template
- Template ID: demo_tag_template
- Location: keep the default setting.
Next, create four tag attributes (also called tag "fields").
Click Add Field. Create four attributes with the values listed below. Note that the "source" attribute defines a required tag attribute. You can use lower case letters and underscores to define attribute names:
- Field display name: Source of data asset
- Field ID: source_of_data_asset
- Make this attribute required: Checked
- Type: String
Click Done. Then click Add Field. Enter in:
- Field display name: Number of rows in data asset
- Field ID: number_of_rows_in_data_asset
- Make this attribute required: Not checked
- Type: Double
Click Done. Then click Add Field. Enter in:
- Field display name: Has PII
- Field ID: has_pii
- Make this attribute required: Not checked
- Type: Boolean
Click Done. Then click Add Field. Enter in:
- Attribute display name: PII type
- Attribute ID: pii_type
- Make this attribute required: Not checked
- Type: Enumerated
Add 3 values to this attribute:
- Social Security Number
- None
Then click Done. The completed tag template form should list the four tag attributes:
Click CREATE. The Data Catalog Tag template page displays template details and attributes:
Tag your table with the newly created tags
To attach a tag to a table in your dataset, click on the Data Catalog icon in the top left corner.
Type in "demo_dataset" in the Search box, then click Search:
The demo_dataset and the trips table that you copied into the dataset are displayed in the search results. Open the trips table by clicking on the name:
The Entry details page opens. Click ATTACH TAG.
From the Attach Tag dialog, leave the "Attach to" field set to "Table", and select the Demo Tag Template in your project.
Next, insert or select the following values for each tag attribute:
- source_of_data_asset: tlc_yellow_trips_2018
- number_of_rows_in_data_asset: 112234626
- has_pii: false
- pii_type: NONE
Click Save. The tag attributes are listed on the Entry details page—on the Tags tab.
Click Check my progress to verify the objective.
Congratulations!
Great job! You learned how to successfully attach a tag to a table with Data Catalog.
Finish Your Quest
This self-paced lab is part of the Qwiklabs BigQuery for Marketing Analysts and Data Catalog Fundamentals Quests. A Quest is a series of related labs that form a learning path. Completing a Quest earns you a badge to recognize your achievement. You can make your badge (or badges) public and link to them in your online resume or social media account. Enroll in a Quest and get immediate completion credit if you've taken this lab. See other available Qwiklabs Quests.
What was covered
In this lab, you learned how to:
-
Enable the Data Catalog API.
-
Create a dataset.
-
Copy a public New York Taxi table to your dataset.
-
Create a tag template and attach the tag to your table.
Next Steps / Learn More
- Read the Data Catalog Overview
- Learn How to search with Data Catalog
- Browse the Overview of APIs and Client Libraries
End your lab
When you have completed your lab, click End Lab. Qwiklabs removes the resources you’ve used and cleans the account for you.
You will be given an opportunity to rate the lab experience. Select the applicable number of stars, type a comment, and then click Submit.
The number of stars indicates the following:
- 1 star = Very dissatisfied
- 2 stars = Dissatisfied
- 3 stars = Neutral
- 4 stars = Satisfied
- 5 stars = Very satisfied
You can close the dialog box if you don't want to provide feedback.
For feedback, suggestions, or corrections, please use the Support tab.
Google Cloud Training & Certification
...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 16, 2020
Lab Last Tested August 31, 2020
Copyright 2020 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.