Delete feature values Stay organized with collections Save and categorize content based on your preferences.
To learn more, run the "Example Feature Store workflow with sample data" notebook in one of the following environments:
Open in Colab |Open in Colab Enterprise |Openin Vertex AI Workbench |View on GitHub
You can delete feature values from an entity type in the following ways:
Delete feature values from specified entities
You can delete feature values from multiple entities within an entity type. To specify the entities from which you want to delete the feature values, you need to list the entity IDs in a CSV file.
REST
To delete feature values, send a POST request using thefeaturestores.entityTypes.deleteFeatureValues method.
Before using any of the request data, make the following replacements:
- LOCATION_ID: Region or location where the featurestore is created. For example,
us-central1. - PROJECT_ID: Yourproject ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE: ID of the entity type from which you want to delete the feature values.
- CSV_FILE_URI: Specify the Cloud Storage URI of the CSV file containing the entity IDs for which you want to delete feature values. The first line of this file should be one of the following:
- If you specify the
entity_id_fieldparameter, then the first line of the CSV file must be the same asENTITY_ID_FIELD. - If you don't specify the
entity_id_fieldparameter, then the first line of the CSV file must be "entity_id".
- If you specify the
- ENTITY_ID_FIELD: (Optional) Enter the string specified in the first line of the CSV file atCSV_FILE_URI.
HTTP method and URL:
POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues
Request JSON body:
{ "selectEntity": { "entityIdSelector": { "csv_source": { "gcs_source": { "uris": [ "CSV_FILE_URI" ] }, "entity_id_field": "ENTITY_ID_FIELD" } } }}To send your request, choose one of these options:
curl
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues"
PowerShell
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/571445526053/locations/us-central1/operations/7688824614775947264", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata", "genericMetadata": { "createTime": "2022-05-09T16:59:38.128375Z", "updateTime": "2022-05-09T16:59:38.128375Z", "state": "RUNNING", "worksOn": [ "projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID" ] } }}View request status
To check the status of the POST request, send the following GET request.
Before using any of the request data, make the following replacements:
- LOCATION_ID: Region or location where the featurestore is created. For example,
us-central1. - OPERATION_NAME: The value of the `name` field in the JSON response received from the POST request to delete feature values.
HTTP method and URL:
GET https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME
To send your request, choose one of these options:
curl
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME"
PowerShell
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME" | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
Delete feature values from specified features within a time range
You can delete feature values from an entity type by specifying the feature IDs and a time range.
Note: Using this option permanently deletes the feature values from the specified feature IDs within the specified time range. This might include data from the online storage. If you want to retain any deleted historical data in the online storage, you must re-ingest it.REST
To delete feature values from an entity type, send a POST request using thefeaturestores.entityTypes.deleteFeatureValues method.
Before using any of the request data, make the following replacements:
- LOCATION_ID: Region or location where the featurestore is created. For example,
us-central1. - PROJECT_ID: Yourproject ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE: ID of the entity type from which you want to delete the feature values.
- START_TIME: Specify the start time of the time range.
- END_TIME: (Optional) Specify the end time of the time range.
Note: If you specify theSTART_TIME without specifying anEND_TIME, then the request deletes the feature values from the specified feature IDs until the current time (when the request is sent). - SKIP_ONLINE_STORAGE_DELETE: (Optional) To delete feature values from the online storage as well as the offline storage, enter
false. Otherwise, to delete feature values from the offline storage only, entertrue.
HTTP method and URL:
POST https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues
Request JSON body:
{ "selectTimeRangeAndFeature": { "timeRange": { "startTime": "START_TIME", "endTime": "END_TIME" }, "featureSelector": { "idMatcher": { "ids": [ "FEATURE_ID", ...] } }, "skipOnlineStorageDelete":SKIP_ONLINE_STORAGE_DELETE }}To send your request, choose one of these options:
curl
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
curl -X POST \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues"
PowerShell
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list. Save the request body in a file namedrequest.json, and execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method POST `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE:deleteFeatureValues" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/571445526053/locations/us-central1/operations/7688824614775947264", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteFeatureValuesOperationMetadata", "genericMetadata": { "createTime": "2022-05-09T16:59:38.128375Z", "updateTime": "2022-05-09T16:59:38.128375Z", "state": "RUNNING", "worksOn": [ "projects/PROJECT_ID/locations/LOCATION_ID/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID" ] } }}View request status
To check the status of the POST request, send the following GET request.
Before using any of the request data, make the following replacements:
- LOCATION_ID: Region or location where the featurestore is created. For example,
us-central1. - OPERATION_NAME: The value of the `name` field in the JSON response received from the POST request to delete feature values.
HTTP method and URL:
GET https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME
To send your request, choose one of these options:
curl
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login , or by usingCloud Shell, which automatically logs you into thegcloud CLI . You can check the currently active account by runninggcloud auth list.Execute the following command:
curl -X GET \
-H "Authorization: Bearer $(gcloud auth print-access-token)" \
"https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME"
PowerShell
Note: The following command assumes that you have logged in to thegcloud CLI with your user account by runninggcloud init orgcloud auth login . You can check the currently active account by runninggcloud auth list.Execute the following command:
$cred = gcloud auth print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION_ID-aiplatform.googleapis.com/v1/OPERATION_NAME" | Select-Object -Expand Content
You should receive a successful status code (2xx) and an empty response.
What's next
View theVertex AI Feature Store quotas and limits.
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-11-24 UTC.
Open in Colab
Open in Colab Enterprise
Openin Vertex AI Workbench
View on GitHub