Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Dentro de un grupo de atributos, puedes actualizar un atributo para asociarlo con una columna específica
en la fuente de datos de BigQuery que se asocia con el grupo de atributos.
Cuando creas o actualizas un atributo, puedes agregar metadatos
definidos por el usuario en forma de etiquetas al atributo. Para obtener más información sobre cómo actualizar las etiquetas de un atributo definidas por el usuario, consulta Actualiza las etiquetas de un atributo.
Antes de comenzar
Autentícate en
Vertex AI, a menos que ya lo hayas hecho.
Para usar las muestras de la API de REST en esta página en un entorno de desarrollo local, debes usar las
credenciales que proporcionas a gcloud CLI.
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["# Update a feature\n\nWithin a feature group, you can update a feature to associate it with a specific column\nin the BigQuery data source that's associated with the feature group.\n\nWhile creating or updating a feature, you have the option to add user-defined\nmetadata in the form of labels to the feature. For more information about how\nto update user-defined labels for a feature, see\n[Update labels for a feature](/vertex-ai/docs/featurestore/latest/feature-labels#feature).\n\nBefore you begin\n----------------\n\n\nto\nVertex AI, unless you've done so already.\n\n\nTo use the REST API samples on this page in a local development environment, you use the\ncredentials you provide to the gcloud CLI.\n\n1. [Install](/sdk/docs/install) the Google Cloud CLI. After installation, [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command: \n\n```bash\ngcloud init\n```\n2. If you're using an external identity provider (IdP), you must first [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n\n\nFor more information, see\n[Authenticate for using REST](/docs/authentication/rest)\nin the Google Cloud authentication documentation.\n\nUpdate a feature\n----------------\n\nUse the following sample to update a feature within a feature group. \n\n### REST\n\n\nTo update a [`Feature`](/vertex-ai/docs/reference/rest/v1/projects.locations.featureGroups.features#resource:-feature)\nresource, send a `PATCH` request by using the\n[features.patch](/vertex-ai/docs/reference/rest/v1/projects.locations.featureGroups.features/patch)\nmethod.\n\n\nBefore using any of the request data,\nmake the following replacements:\n\n- \u003cvar translate=\"no\"\u003eLOCATION_ID\u003c/var\u003e: Region where the feature group containing the feature is located, such as `us-central1`.\n- \u003cvar translate=\"no\"\u003ePROJECT_ID\u003c/var\u003e: Your project ID.\n- \u003cvar translate=\"no\"\u003eFEATURE_GROUP_NAME\u003c/var\u003e: The name of the feature group containing the feature.\n- \u003cvar translate=\"no\"\u003eFEATURE_NAME\u003c/var\u003e: The name of the feature you want to update.\n- \u003cvar translate=\"no\"\u003eVERSION_COLUMN_NAME\u003c/var\u003e: The column from the BigQuery source table or view that you want to associate while updating the feature.\n\n\nHTTP method and URL:\n\n```\nPATCH https://LOCATION_ID-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME/features?feature_id=FEATURE_NAME\n```\n\n\nRequest JSON body:\n\n```\n{\n \"version_column_name\": \"VERSION_COLUMN_NAME\"\n}\n```\n\nTo send your request, choose one of these options: \n\n#### curl\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) , or by using [Cloud Shell](/shell/docs), which automatically logs you into the `gcloud` CLI . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\ncurl -X PATCH \\\n -H \"Authorization: Bearer $(gcloud auth print-access-token)\" \\\n -H \"Content-Type: application/json; charset=utf-8\" \\\n -d @request.json \\\n \"https://LOCATION_ID-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME/features?feature_id=FEATURE_NAME\"\n```\n\n#### PowerShell\n\n| **Note:** The following command assumes that you have logged in to the `gcloud` CLI with your user account by running [`gcloud init`](/sdk/gcloud/reference/init) or [`gcloud auth login`](/sdk/gcloud/reference/auth/login) . You can check the currently active account by running [`gcloud auth list`](/sdk/gcloud/reference/auth/list).\n\n\nSave the request body in a file named `request.json`,\nand execute the following command:\n\n```\n$cred = gcloud auth print-access-token\n$headers = @{ \"Authorization\" = \"Bearer $cred\" }\n\nInvoke-WebRequest `\n -Method PATCH `\n -Headers $headers `\n -ContentType: \"application/json; charset=utf-8\" `\n -InFile request.json `\n -Uri \"https://LOCATION_ID-aiplatform.googleapis.com/v1beta1/projects/PROJECT_ID/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME/features?feature_id=FEATURE_NAME\" | Select-Object -Expand Content\n```\n\nYou should receive a JSON response similar to the following:\n\n```\n{\n \"name\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME/features/FEATURE_NAME/operations/OPERATION_ID\",\n \"metadata\": {\n \"@type\": \"type.googleapis.com/google.cloud.aiplatform.v1beta1.UpdateFeatureOperationMetadata\",\n \"genericMetadata\": {\n \"createTime\": \"2023-09-18T02:36:22.870679Z\",\n \"updateTime\": \"2023-09-18T02:36:22.870679Z\"\n }\n },\n \"done\": true,\n \"response\": {\n \"@type\": \"type.googleapis.com/google.cloud.aiplatform.v1beta1.Feature\",\n \"name\": \"projects/PROJECT_NUMBER/locations/LOCATION_ID/featureGroups/FEATURE_GROUP_NAME/features/FEATURE_NAME\"\n }\n}\n```\n\n\u003cbr /\u003e\n\nWhat's next\n-----------\n\n- Learn how to [create a feature](/vertex-ai/docs/featurestore/latest/create-feature).\n\n- Learn how to [delete a feature view](/vertex-ai/docs/featurestore/latest/delete-featureview)."]]