刪除特徵群組時,您會自動取消註冊為該特徵群組註冊的所有 BigQuery 資料來源。如果地圖項目群組包含現有地圖項目,您可以使用 force
查詢參數刪除地圖項目群組。刪除特徵群組會從特徵註冊庫中取消註冊 BigQuery 資料表或檢視表,但不會影響這些資料來源中所含的特徵資料。
事前準備
驗證 Vertex AI (如果您尚未驗證)。
Select the tab for how you plan to use the samples on this page:
Console
When you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
REST
如要在本機開發環境中使用本頁的 REST API 範例,請使用您提供給 gcloud CLI 的憑證。
After installing the Google Cloud CLI, initialize it by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
詳情請參閱 Google Cloud 驗證說明文件中的「驗證以使用 REST」。
刪除特徵群組
請使用下列範例刪除地圖項目群組及其地圖項目。
控制台
請按照下列操作說明,使用 Google Cloud 控制台刪除功能群組及其所有功能。
在 Google Cloud 控制台的 Vertex AI 專區中,前往「Feature Store」頁面。
在「功能群組」部分,選取要刪除的功能群組旁邊的核取方塊。
依序點選「Delete」和「Confirm」。
REST
如要刪除 FeatureGroup
資源,請使用 featureGroups.delete 方法傳送 DELETE
要求。
使用任何要求資料之前,請先替換以下項目:
- LOCATION_ID:地圖項目所在的區域,例如
us-central1
。 - PROJECT_ID:您的專案 ID。
- FEATURE_GROUP_NAME:要刪除的特徵群組名稱。
- BOOLEAN:選用:如要刪除地圖項目群組 (即使地圖項目群組包含地圖項目),請輸入
true
。預設值為false
。
HTTP 方法和網址:
DELETE https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME?force=BOOLEAN
如要傳送要求,請選擇以下其中一個選項:
curl
執行下列指令:
curl -X DELETE \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME?force=BOOLEAN"
PowerShell
執行下列指令:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME?force=BOOLEAN" | Select-Object -Expand Content
您應該會收到如下的 JSON 回應:
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata", "genericMetadata": { "createTime": "2023-09-15T04:54:03.632646Z", "updateTime": "2023-09-15T04:54:03.632646Z" } }, "done": true, "response": { "@type": "type.googleapis.com/google.protobuf.Empty" } }
後續步驟
瞭解如何建立特徵組群。
瞭解如何更新功能群組。
瞭解如何從特徵群組中刪除特徵。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-07-09 (世界標準時間)。