https://www.skills.google/games/7172/labs/44416
β
Test result: the new script nov05_gsp1145.sh passed all 4 checks of the lab.
Welcome to Cloud Shell! Type "help" to get started, or type "gemini" to try prompting with Gemini CLI.
Your Cloud Platform project in this session is set to qwiklabs-gcp-00-552b9dbd1d54.
Use `gcloud config set project [PROJECT_ID]` to change to a different project.
student_02_5f732526960d@cloudshell:~ (qwiklabs-gcp-00-552b9dbd1d54)$ rm -f nov05_gsp1145.sh
curl -LO https://raw.githubusercontent.com/nov05/gcp-skills-boost/refs/heads/dev/GSP1145%20Create%20and%20Add%20Aspects%20to%20Knowledge%20Catalog%20Assets/nov05_gsp1145.sh
chmod +x nov05_gsp1145.sh
./nov05_gsp1145.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 6692 100 6692 0 0 28241 0 --:--:-- --:--:-- --:--:-- 28355
Your active configuration is: [cloudshell-24724]
Your active configuration is: [cloudshell-24724]
Updated property [compute/region].
πΉ Project ID: qwiklabs-gcp-00-552b9dbd1d54
πΉ Project number: 84024950774
πΉ Region: us-west1
πΉ Zone: us-west1-a
πΉ User: student_02_5f732526960d
========================================================
Task 1. Create a lake, zone, and asset in Knowledge Catalog
========================================================
Operation "operations/acat.p2-84024950774-3a685c08-38df-47da-803b-7f5657f0da34" finished successfully.
Waiting for [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/operations/operation-1778629005674-651a75612073a-a5c1a7b7-f721df53] to finish...done.
Created [orders-lake] Lake created in [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1].
Waiting for [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/operations/operation-1778629174069-651a7601b89f5-db778b11-b763e501] to finish...done.
Created [customer-curated-zone] Zone created in [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/lakes/orders-lake].
Waiting for [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/operations/operation-1778629184918-651a760c1146a-5831bd96-cc815c8b] to finish...done.
Created [customer-details-dataset] Asset created in [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/lakes/orders-lake/zones/customer-curated-zone].
π Data lake list:
NAME: orders-lake
DISPLAY_NAME: Orders Lake
LAKE_STATUS: ACTIVE
METASTORE_STATUS: NONE
METASTORE:
SECURITY_STATUS:
ACTIVE_ASSETS:
LABELS:
π Data zone list:
NAME: customer-curated-zone
DISPLAY_NAME: Customer Curated Zone
ZONE_STATUS: ACTIVE
ZONE_TYPE: CURATED
RESOURCE_LOCATION_TYPE: SINGLE_REGION
DISCOVERY_ENABLED:
SECURITY_STATUS:
ACTIVE_ASSETS:
LABELS:
π Data asset list:
NAME: customer-details-dataset
DISPLAY_NAME: Customer Details Dataset
ASSET_STATUS: ACTIVE
DISCOVERY_ENABLED:
DISCOVERY_STATUS: DISABLED
RESOURCE_NAME: projects/qwiklabs-gcp-00-552b9dbd1d54/datasets/customers
RESOURCE_TYPE: BIGQUERY_DATASET
RESOURCE_STATE: READY
SECURITY_STATUS: READY
LABELS:
========================================================
Task 2. Create an aspect type
========================================================
https://docs.cloud.google.com/dataplex/docs/enrich-entries-metadata#gcloud
Waiting for [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/operations/operation-1778629231859-651a7638d558e-9eeabb8a-b8e93519] to finish...done.
Created [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/aspectTypes/protected-data-aspect] Aspect Type created in project [qwiklabs-gcp-00-552b9dbd1d54] with location [us-west1].
authorization: {}
createTime: '2026-05-12T23:40:31.934272113Z'
displayName: Protected Data Aspect
etag: Tt53nBZsJwPQTH1zRhQkVrKVvScnehsrM-q2B5J3rZI
metadataTemplate:
name: protected_data_template
recordFields:
- annotations:
displayName: Protected Data Flag
constraints:
required: true
enumValues:
- index: 1
name: Yes
- index: 2
name: No
index: 1
name: protected_data_flag
type: enum
type: record
name: projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/aspectTypes/protected-data-aspect
uid: 838825eb-e7fe-42f4-8ee6-a2c50787dd71
updateTime: '2026-05-12T23:40:33.451675068Z'
π Check entry list:
ENTRY_ID: protected-data-aspect_aspectType
SOURCE_LOCATION: us-west1
DISPLAY_NAME: Protected Data Aspect
DESCRIPTION:
RESOURCE: projects/84024950774/locations/us-west1/aspectTypes/protected-data-aspect
SYSTEM: Dataplex
PLATFORM: GCP
LABELS:
ANCESTORS:
ENTRY_TYPE: projects/655216118709/locations/global/entryTypes/aspecttype
ENTRY_CREATE_TIME: 2026-05-12T23:40:33.594437Z
ENTRY_UPDATE_TIME: 2026-05-12T23:40:33.594437Z
PARENT_ENTRY:
FULLY_QUALIFIED_NAME:
SOURCE_CREATE_TIME: 2026-05-12T23:40:33.432189Z
SOURCE_UPDATE_TIME: 2026-05-12T23:40:33.432189Z
ENTRY_ID: @dataplex_entry
SOURCE_LOCATION: us-west1
DISPLAY_NAME:
DESCRIPTION:
RESOURCE: projects/84024950774/locations/us-west1/entryGroups/@dataplex
SYSTEM: Dataplex
PLATFORM: GCP
LABELS:
ANCESTORS:
ENTRY_TYPE: projects/655216118709/locations/global/entryTypes/entrygroup
ENTRY_CREATE_TIME: 2026-05-12T23:40:33.555598Z
ENTRY_UPDATE_TIME: 2026-05-12T23:40:35.886278Z
PARENT_ENTRY:
FULLY_QUALIFIED_NAME:
SOURCE_CREATE_TIME: 2026-05-12T23:40:34.762505Z
SOURCE_UPDATE_TIME: 2026-05-12T23:40:34.762505Z
π Check entry protected-data-aspect_aspectType:
aspects:
655216118709.global.aspecttype-aspect:
aspectSource: {}
aspectType: projects/655216118709/locations/global/aspectTypes/aspecttype-aspect
createTime: '2026-05-12T23:40:33.594437Z'
data: {}
updateTime: '2026-05-12T23:40:33.594437Z'
createTime: '2026-05-12T23:40:33.594437Z'
entrySource:
createTime: '2026-05-12T23:40:33.432189Z'
displayName: Protected Data Aspect
location: us-west1
platform: GCP
resource: projects/84024950774/locations/us-west1/aspectTypes/protected-data-aspect
system: Dataplex
updateTime: '2026-05-12T23:40:33.432189Z'
entryType: projects/655216118709/locations/global/entryTypes/aspecttype
name: projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/entryGroups/@dataplex/entries/protected-data-aspect_aspectType
updateTime: '2026-05-12T23:40:33.594437Z'
========================================================
Task 3. Add an aspect to assets
========================================================
https://docs.cloud.google.com/dataplex/docs/enrich-entries-metadata#gcloud
https://docs.cloud.google.com/sdk/gcloud/reference/dataplex/entries/update
π Check aspect-patch.json:
{
"qwiklabs-gcp-00-552b9dbd1d54.us-west1.protected-data-aspect": {
"data": {
"protected_data_flag": "Yes",
}
},
"qwiklabs-gcp-00-552b9dbd1d54.us-west1.protected-data-aspect@Schema.zip": {
"data": {
"protected_data_flag": "Yes",
}
},
"qwiklabs-gcp-00-552b9dbd1d54.us-west1.protected-data-aspect@Schema.state": {
"data": {
"protected_data_flag": "Yes",
"protected_data_flag": "Yes",
}
},
"qwiklabs-gcp-00-552b9dbd1d54.us-west1.protected-data-aspect@Schema.city": {
"data": {
"protected_data_flag": "Yes",
}
},
"qwiklabs-gcp-00-552b9dbd1d54.us-west1.protected-data-aspect@Schema.longitude": {
"data": {
"protected_data_flag": "Yes",
}
},
}
Updated entry [projects/qwiklabs-gcp-00-552b9dbd1d54/locations/us-west1/entryGroups/@bigquery/entries/bigquery.googleapis.com/projects/qwiklabs-gcp-00-552b9dbd1d54/datasets/customers/tables/customer_details].
========================================================
Task 4. Search for assets using aspects
========================================================
student_02_5f732526960d@cloudshell:~ (qwiklabs-gcp-00-552b9dbd1d54)$
β