刪除特徵檢視表

刪除特徵檢視表不會取消進行中的線上供應作業。您必須從要刪除的功能檢視畫面中,停止所有目前處於啟用狀態的線上放送作業。否則,刪除特徵檢視表後,線上供應作業會失敗。

如果線上商店例項使用 Bigtable 線上服務,從 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 主控台刪除地圖檢視畫面。

  1. 在 Google Cloud 控制台的 Vertex AI 專區中,前往「Feature Store」頁面。

    前往「Feature Store」頁面

  2. 按一下「網路商店」

  3. 按一下網路商店名稱,即可在「網路商店詳細資料」頁面查看詳細資料。

  4. 在「地圖層級別」部分,找出要刪除的地圖層級別,然後勾選旁邊的核取方塊。

  5. 依序點選「Delete」和「Confirm」

REST

如要刪除 FeatureView 執行個體,請使用 featureViews.delete 方法傳送 DELETE 要求。

使用任何要求資料之前,請先替換以下項目:

  • LOCATION_ID:線上商店所在的區域,例如 us-central1
  • PROJECT_ID:您的專案 ID。
  • FEATUREONLINESTORE_NAME:包含功能檢視畫面的線上商店名稱。
  • FEATUREVIEW_NAME:要刪除的地圖項目檢視表名稱。

HTTP 方法和網址:

DELETE https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME

如要傳送要求,請選擇以下其中一個選項:

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/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME"

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/featureOnlineStores/FEATUREONLINESTORE_NAME/featureViews/FEATUREVIEW_NAME" | Select-Object -Expand Content

您應該會收到如下的 JSON 回應:

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION_ID/featureOnlineStores/FEATUREONLINESTORE_NAME/operations/OPERATION_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata",
    "genericMetadata": {
      "createTime": "2023-09-15T17:30:31.741064Z",
      "updateTime": "2023-09-15T17:30:31.741064Z"
    }
  }
}

後續步驟