Create and Add Aspects to Dataplex Assets - GSP1145

A passionate full-stack developer from @ePlus.DEV
Search for a command to run...

A passionate full-stack developer from @ePlus.DEV
No comments yet. Be the first to comment.
Quick and practical tips to help users optimize tasks, improve skills, and solve common problems effectively across various areas like tech, lifestyle, productivity, and more.
Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary OpenAI công bố báo cáo mới về cách AI đang làm thay đổi phạm vi công

Overview In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Anthropic bổ sung khả năng thay đổi tool giữa cuộc hội thoại mà không

Một bản tin giúp Developer cập nhật nhanh AI, Cloud, Open Source và những công nghệ đáng chú ý trong ngày. 📌 Executive Summary Claude Opus 5 bắt đầu được triển khai trên GitHub Copilot cho các tác

Dataplex 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.
Dataplex Universal Catalog is a fully managed, scalable metadata management service within Dataplex. Dataplex Universal Catalog lets you create aspect types and then add those aspects to data assets. Aspects let you capture metadata within entries. Adding aspects to an entry (or asset) helps provide meaningful context to anyone who needs to use the asset. You can use aspects to store business metadata (for example, data classification) and technical metadata (for example, schema).
Aspects allow you to add custom metadata to assets for easy identification and retrieval, such as adding an aspect to certain assets to identify that they contain protected or sensitive data. You can also create reusable aspect types to rapidly add the same aspects to different data assets.
In this lab, you learn how to use Dataplex Universal Catalog to create an aspect type, add the aspect to Dataplex assets, and then use the aspect to search for assets.
In this lab, you learn how to perform the following:
Enable the Dataplex API.
Create a lake, zone, and asset in Dataplex.
Create an aspect type.
Add an aspect to assets.
Search for assets using aspects.
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:
Note: Use an Incognito (recommended) or private browser window to run this lab. This prevents conflicts between your personal account and the student account, which may cause extra charges incurred to your personal account.
Note: Use only the student account for this lab. If you use a different Google Cloud account, you may incur charges to that account.
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:
The Open Google Cloud console button
Time remaining
The temporary credentials that you must use for this lab
Other information, if needed, to step through this lab
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.
Note: If you see the Choose an account dialog, click Use Another Account.
If necessary, copy the Username below and paste it into the Sign in dialog.
student-01-ca687293fd1f@qwiklabs.net
Copied!
You can also find the Username in the Lab Details pane.
Click Next.
Copy the Password below and paste it into the Welcome dialog.
jCSS3OSr9yO5
Copied!
You can also find the Password in the Lab Details pane.
Click Next.
Important: You must use the credentials the lab provides you. Do not use your Google Cloud account credentials.
Note: Using your own Google Cloud account for this lab may incur extra 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 Google Cloud console opens in this tab.
Note: To access Google Cloud products and services, click the Navigation menu or type the service or product name in the Search field.
In the Google Cloud console title bar, type Cloud Dataplex API in the Search field and then click Cloud Dataplex API in the search results.
If needed, click Enable to enable the Cloud Dataplex API.
In this task, you create a new Dataplex lake to store customer order information, add a curated zone to the lake, and then attach a pre-created BigQuery dataset as a new asset in the zone.
In the Google Cloud console title bar, type Dataplex Universal Catalog, and then click Dataplex Universal Catalog, type Product or Page from the search results.
In the left pane, under Manage lakes, click Manage.
Click Create Lake.
Set the properties below as follows, leave the remaining properties as their default.
| Property | Value |
|---|---|
| Display Name | Orders Lake |
| Region | us-central1 |
It can take a few minutes for the lake to be created.
You can proceed to the next section once the status of the lake is Active.
In the Lakes list, click Orders Lake.
Click Add zone.
Set the properties below as follows to create a new zone. Leave all other properties at their default values.
| Property | Value |
|---|---|
| Display Name | Customer Curated Zone |
| Type | Curated zone |
| Data locations | Regional |
It can take a few minutes for the zone to be created.
You can proceed to the next section once the status of the zone is Active.
In the Zones instance list, click Customer Curated Zone.
Click Add assets.
Click Add an asset.
Set the properties below as follows, and leave the remaining properties at the default values:
| Property | Value |
|---|---|
| Type | BigQuery dataset |
| Display Name | Customer Details Dataset |
| Dataset | qwiklabs-gcp-01-91b56212aea5.customers |
Click Continue.
For Discovery settings, select Inherit to inherit the Discovery settings from the zone level, and then click Continue.
Click Submit.
Create a lake, zone, and asset in Dataplex
An aspect type is a reusable template for aspects. Every aspect is an instance of an aspect type. To add an aspect to an asset, you first need to create one or more aspect types.
In this task, you create an aspect type to label BigQuery table columns with a protected status. With a public aspect type, users with access to the BigQuery table can see the aspects applied to the columns.
On the left pane, under Manage Metadata, click Catalog.
Click Create aspect type.
Enter the required information to define the aspect type:
| Property | Value |
|---|---|
| Display Name | Protected Data Aspect |
| Location | us-central1 |
| Property | Value |
|---|---|
| Field Display Name | Protected Data Flag |
| Type | Enum |
Select the Is Required checkbox.
Click Add an enum value.
For Values, enter Yes.
Click Done.
Click Add an enum value.
For Values, enter No.
Click Done.
Click Save.
Note: It can take a few minutes for the aspect type to be created before the progress check returns a successful message.
Create an aspect type
After you create an aspect type, you can add that aspect to any number of data assets.
In this task, you add the Protected Data aspect to columns in the BigQuery table that need a protected data status.
On the left menu, under Discover, click Search.
On the Search bar, be sure Dataplex Universal Catalog is selected.
For Filters > Systems, select the BigQuery checkbox.
In the Find data across your projects and organizations field, enter customer_details and then click customer_details from the search results.
If you do not see the customer_details table, make sure that the search platform is selected as Dataplex Universal Platform on the top right.
If needed, click Enable to enable the Google Cloud Data Catalog API.
On the Search bar, be sure Dataplex Universal Catalog is selected.
Scroll down to the Tags & aspects section. Next to Optional tags & aspects, click Add.
Type protected data aspect in the Filter field, and then click the Protected Data Aspect aspect from the results.
For Protected Data Flag, select Yes.
Click Save.
Click the Schema tab.
Select the following column checkboxes:
zip
state
last_name
country
latitude
first_name
city
longitude
Click Add tag or aspect.
Click Protected Data Aspect.
For Protected Data Flag, select Yes.
Click Save.
Note: It can take a few minutes for the aspect type to be added to the asset before the progress check returns a successful message.
Add an aspect to assets
After you add an aspect to an asset, such as a table column, you can search for that asset using the aspect name in Dataplex Universal Catalog.
In this task, you search for the assets that have the Protected Data aspect applied.
On the left menu, under Discover, click Search.
On the Search bar, be sure Dataplex Universal Catalog is selected.
For Filters > Aspects, select the Protected Data Aspect checkbox.
Click the customer_details table.
Click the Schema tab to see the Protected Data aspects on the specified columns.
Task 1: Run the script in the terminal
curl -LO raw.githubusercontent.com/ePlus-DEV/storage/refs/heads/main/labs/GSP1145/old-lab.sh
source old-lab.sh
Script Alternative
curl -LO https://raw.githubusercontent.com/pspcps/Arcade/master/GSP1145.sh
sudo chmod +x GSP1145.sh
./GSP1145.sh
Task 2: Open the link
Task 3: Open the link