Learn how to manage and find features.
Create a feature
Create a single feature for an existing entity type. To create multiple features in a single request, see Batch creating features.
Web UI
- In the Vertex AI section of the Google Cloud console, go to the Features page.
- Select a region from the Region drop-down list.
- In the features table, view the Entity type column and click the entity type to add features to.
- Click Add features to open the Add features pane.
- Specify a name, value type, and (optionally) a description for the feature.
- To enable feature value monitoring (Preview), under Feature monitoring, select Override entity type monitoring config and then enter the number of days between snapshots. This configuration overrides any existing or future monitoring configurations on the feature's entity type. For more information, see Feature value monitoring.
- To add more features, click Add another feature.
- Click Save.
REST & CMD LINE
To create a feature for an existing entity type, send a POST request by using the featurestores.entityTypes.features.create method.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE_ID: ID of the entity type.
- FEATURE_ID: An ID for the feature.
- DESCRIPTION: Description of the feature.
- VALUE_TYPE: The value type of the feature.
HTTP method and URL:
POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=FEATURE_ID
Request JSON body:
{ "description": "DESCRIPTION", "valueType": "VALUE_TYPE" }
To send your request, choose one of these options:
curl
Save the request body in a file called request.json
,
and execute the following command:
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=FEATURE_ID"
PowerShell
Save the request body in a file called request.json
,
and execute the following command:
$cred = gcloud auth application-default 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-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID?featureId=FEATURE_ID" | Select-Object -Expand Content
You should see output similar to the following. You can use the OPERATION_ID in the response to get the status of the operation.
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.CreateFeatureOperationMetadata", "genericMetadata": { "createTime": "2021-03-02T00:04:13.039166Z", "updateTime": "2021-03-02T00:04:13.039166Z" } } }
Python
To learn how to install and use the client library for Vertex AI, see Vertex AI client libraries. For more information, see the Vertex AI Python API reference documentation.
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
Batch create features
Create features in bulk for an existing type. For batch creation requests,
Vertex AI Feature Store creates multiple features at once, which is faster
for creating a large number of features compared to the
featurestores.entityTypes.features.create
method.
Web UI
See creating a feature.
REST & CMD LINE
To create one or more features for an existing entity type, send a POST request by using the featurestores.entityTypes.features.batchCreate method, as shown in the following sample.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE_ID: ID of the entity type.
- FEATURE_ID: An ID for the feature.
- DESCRIPTION: Description of the feature.
- VALUE_TYPE: The value type of the feature.
- DURATION: (Optional) The interval duration between snapshots in seconds. The value must end with an `s`.
HTTP method and URL:
POST https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features:batchCreate
Request JSON body:
{ "requests": [ { "feature": { "description": "DESCRIPTION_1", "valueType": "VALUE_TYPE_1", "monitoringConfig": { "snapshotAnalysis": { "monitoringInterval": "DURATION" } } }, "featureId": "FEATURE_ID_1" }, { "feature": { "description": "DESCRIPTION_2", "valueType": "VALUE_TYPE_2", "monitoringConfig": { "snapshotAnalysis": { "monitoringInterval": "DURATION" } } }, "featureId": "FEATURE_ID_2" } ] }
To send your request, choose one of these options:
curl
Save the request body in a file called request.json
,
and execute the following command:
curl -X POST \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
-H "Content-Type: application/json; charset=utf-8" \
-d @request.json \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features:batchCreate"
PowerShell
Save the request body in a file called request.json
,
and execute the following command:
$cred = gcloud auth application-default 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-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features:batchCreate" | Select-Object -Expand Content
You should see output similar to the following. You can use the OPERATION_ID in the response to get the status of the operation.
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.BatchCreateFeaturesOperationMetadata", "genericMetadata": { "createTime": "2021-03-02T00:04:13.039166Z", "updateTime": "2021-03-02T00:04:13.039166Z" } } }
Python
To learn how to install and use the client library for Vertex AI, see Vertex AI client libraries. For more information, see the Vertex AI Python API reference documentation.
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
List features
List all features in a given location. To search for features across all entity types and featurestores in a given location, see the Searching for features method.
Web UI
- In the Vertex AI section of the Google Cloud console, go to the Features page.
- Select a region from the Region drop-down list.
- In the features table, view the Features column to see the features in your project for the selected region.
REST & CMD LINE
To list all features for a single entity type, send a GET request by using the featurestores.entityTypes.features.list method.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE_ID: ID of the entity type.
HTTP method and URL:
GET https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features"
PowerShell
Execute the following command:
$cred = gcloud auth application-default print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "features": [ { "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID_1", "description": "DESCRIPTION", "valueType": "VALUE_TYPE", "createTime": "2021-03-01T22:41:20.626644Z", "updateTime": "2021-03-01T22:41:20.626644Z", "labels": { "environment": "testing" }, "etag": "AMEw9yP0qJeLao6P3fl9cKEGY4ie5-SanQaiN7c_Ca4QOa0u7AxwO6i75Vbp0Cr51MSf" }, { "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID_2", "description": "DESCRIPTION", "valueType": "VALUE_TYPE", "createTime": "2021-02-25T01:27:00.544230Z", "updateTime": "2021-02-25T01:27:00.544230Z", "labels": { "environment": "testing" }, "etag": "AMEw9yMdrLZ7Waty0ane-DkHq4kcsIVC-piqJq7n6A_Y-BjNzPY4rNlokDHNyUqC7edw" }, { "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID_3", "description": "DESCRIPTION", "valueType": "VALUE_TYPE", "createTime": "2021-03-01T22:41:20.628493Z", "updateTime": "2021-03-01T22:41:20.628493Z", "labels": { "environment": "testing" }, "etag": "AMEw9yM-sAkv-u-jzkUOToaAVovK7GKbrubd9DbmAonik-ojTWG8-hfSRYt6jHKRTQ35" } ] }
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
Search for features
Search for features based on one or more of their properties, such as feature ID, entity type ID, or feature description. Vertex AI Feature Store searches across all featurestores and entity types in a given location. You can also limit results by filtering on specific featurestores, value types, and labels.
To list all features, see Listing features.
Web UI
- In the Vertex AI section of the Google Cloud console, go to the Features page.
- Select a region from the Region drop-down list.
- Click the features table's Filter field.
- Select a property to filter on such as Feature, which returns features that contain a matching string anywhere in their ID.
- Type a value for the filter and then press enter. Vertex AI Feature Store returns results in the features table.
- To add additional filters, click the Filter field again.
REST & CMD LINE
To search for features, send a GET request by using the
featurestores.searchFeatures
method. The following sample uses multiple search parameters, written as
featureId:test AND valueType=STRING
. The query returns features
that contain test
in their ID and whose values are of type
STRING
.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
HTTP method and URL:
GET https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores:searchFeatures?query="featureId:test%20AND%20valueType=STRING"
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores:searchFeatures?query="featureId:test%20AND%20valueType=STRING""
PowerShell
Execute the following command:
$cred = gcloud auth application-default print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores:searchFeatures?query="featureId:test%20AND%20valueType=STRING"" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "features": [ { "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/featurestore_demo/entityTypes/testing/features/test1", "description": "featurestore test1", "createTime": "2021-02-26T18:16:09.528185Z", "updateTime": "2021-02-26T18:16:09.528185Z", "labels": { "environment": "testing" } } ] }
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
View feature details
View details about a feature, such as its value type or description. If you use the Cloud console and have feature monitoring enabled, you can also view the distribution of feature values over time.
Web UI
- In the Vertex AI section of the Google Cloud console, go to the Features page.
- Select a region from the Region drop-down list.
- In the features table, view the Features column to find the feature that you want to view details for.
- Click the name of a feature to view its details.
- To view its metrics, click Metrics. Vertex AI Feature Store provides feature distribution metrics for the feature.
REST & CMD LINE
To get details about a feature, send a GET request by using the featurestores.entityTypes.features.get method.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE_ID: ID of the entity type.
- FEATURE_ID: ID of the feature.
HTTP method and URL:
GET https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X GET \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID"
PowerShell
Execute the following command:
$cred = gcloud auth application-default print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method GET `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID", "description": "DESCRIPTION", "valueType": "VALUE_TYPE", "createTime": "2021-03-01T22:41:20.628493Z", "updateTime": "2021-03-01T22:41:20.628493Z", "labels": { "environment": "testing" }, "etag": "AMEw9yOZbdYKHTyjV22ziZR1vUX3nWOi0o2XU3-OADahSdfZ8Apklk_qPruhF-o1dOSD", "monitoringConfig": {} }
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
Delete a feature
Delete a feature and all of its values.
Web UI
- In the Vertex AI section of the Google Cloud console, go to the Features page.
- Select a region from the Region drop-down list.
- In the features table, view the Feature column and find the feature to delete.
- Click the name of the feature.
- From the action bar, click Delete.
- Click Confirm to delete the feature and its values.
REST & CMD LINE
To delete a feature, send a DELETE request by using the featurestores.entityTypes.features.delete method.
Before using any of the request data, make the following replacements:
- LOCATION: Region where the featurestore is located, such as
us-central1
. - PROJECT: Your project ID.
- FEATURESTORE_ID: ID of the featurestore.
- ENTITY_TYPE_ID: ID of the entity type.
- FEATURE_ID: ID of the feature.
HTTP method and URL:
DELETE https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID
To send your request, choose one of these options:
curl
Execute the following command:
curl -X DELETE \
-H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
"https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID"
PowerShell
Execute the following command:
$cred = gcloud auth application-default print-access-token
$headers = @{ "Authorization" = "Bearer $cred" }
Invoke-WebRequest `
-Method DELETE `
-Headers $headers `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID/entityTypes/ENTITY_TYPE_ID/features/FEATURE_ID" | Select-Object -Expand Content
You should receive a JSON response similar to the following:
{ "name": "projects/PROJECT_NUMBER/locations/LOCATION/featurestores/FEATURESTORE_ID/operations/OPERATION_ID", "metadata": { "@type": "type.googleapis.com/google.cloud.aiplatform.v1.DeleteOperationMetadata", "genericMetadata": { "createTime": "2021-02-26T17:32:56.008325Z", "updateTime": "2021-02-26T17:32:56.008325Z" } }, "done": true, "response": { "@type": "type.googleapis.com/google.protobuf.Empty" } }
Additional languages
You can install and use the following Vertex AI client libraries to call the Vertex AI API. Cloud Client Libraries provide an optimized developer experience by using each supported language's natural conventions and styles.
What's next
- Learn how to batch ingest feature values.
- Learn how to monitor ingested feature values over time.
- Learn how to serve features through online serving or batch serving.
- Troubleshoot common Vertex AI Feature Store issues.