Manage featurestores

Learn how to create, list, describe, update, and delete featurestores.

Create a featurestore

Create a featurestore resource to contain entity types and features. The location of your featurestore must be in the same location as your source data. For example, if your featurestore is in us-central, you can ingest data from files in Cloud Storage buckets that are in us-central1 or in the US multi-region location. Similarly for BigQuery, you can ingest data from tables that are in us-central1 or in the US multi-region location. For more information about source data requirements, see Data source.

Web UI

Use another method. You cannot create a featurestore from the Cloud Console.

REST & CMD LINE

To create a featurestore, send a POST request by using the featurestores.create method.

The following sample creates a featurestore with a fixed node count of 2. The node count specifies the number of online serving nodes, which affects the number of online serving requests that the featurestore can handle. The latency could increase if the number of nodes cannot support the number of incoming requests.

Before using any of the request data, make the following replacements:

  • LOCATION: Region where the featurestore is created. For example, us-central1.
  • PROJECT: Your project ID or project number.
  • FEATURESTORE_ID: ID for the featurestore.
  • PROJECT_NUMBER: Project number for your project (appears in the response).

HTTP method and URL:

POST https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores?featurestoreId=FEATURESTORE_ID

Request JSON body:

{
  "online_serving_config": {
    "fixed_node_count": 2
  },
  "labels": {
    "environment": "testing"
  }
}

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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores?featurestoreId=FEATURESTORE_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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores?featurestoreId=FEATURESTORE_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.v1beta1.CreateFeaturestoreOperationMetadata",
    "genericMetadata": {
      "createTime": "2021-02-26T00:44:40.722474Z",
      "updateTime": "2021-02-26T00:44:40.722474Z"
    }
  }
}

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 featurestores

List all featurestores in a project.

Web UI

  1. In the Vertex AI section of the Google Cloud Console, go to the Features page.

    Go to the Features page

  2. Select a region from the Region drop-down list.
  3. In the features table, view the Featurestore column to see the featurestores in your project for the selected region.

REST & CMD LINE

To list featurestores for a particular region in your project, send a GET request by using the featurestores.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 or project number.
  • PROJECT_NUMBER: Project number for your project (appears in the response).

HTTP method and URL:

GET https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores

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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores"

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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "featurestores": [
    {
      "name": "projects/PROJECT_NUMBER/locations/us-central1/featurestores/test",
      "createTime": "2021-02-26T00:44:44.216805Z",
      "updateTime": "2021-02-26T00:44:44.364916Z",
      "etag": "AMEw9yNL0s7qZh8lZVZ5T3BEuhoEgFR7JmjbbCSAkRZjeKDXkkIYnxxA4POe5BWT8cCn",
      "labels": {
        "environment": "testing"
      },
      "onlineServingConfig": {
        "fixedNodeCount": 2
      },
      "state": "STABLE"
    },
    {
      "name": "projects/PROJECT_NUMBER/locations/us-central1/featurestores/featurestore_demo",
      "createTime": "2021-02-25T00:39:40.598781Z",
      "updateTime": "2021-02-25T00:39:40.744038Z",
      "etag": "AMEw9yO_e0vm-9W_yeCz4rJm-XnnEMYQ-vQesevxya_sz-FckuysnDwo3cEXHdWWSeda",
      "labels": {
        "environment": "testing"
      },
      "onlineServingConfig": {
        "fixedNodeCount": 3
      },
      "state": "STABLE"
    }
  ]
}

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 featurestore details

Get details about a featurestore such as its name and online serving configuration. If you use the Cloud Console, you can view Cloud Monitoring metrics for featurestores.

Web UI

  1. In the Vertex AI section of the Google Cloud Console, go to the Features page.

    Go to the Features page

  2. Select a region from the Region drop-down list.
  3. In the features table, view the Featurestore column to find the featurestore that you want to view metrics for.
  4. Click the name of the featurestore to view its Monitoring metrics.

REST & CMD LINE

To get details about a single featurestore, send a GET request by using the featurestores.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 or project number.
  • FEATURESTORE_ID: ID of the featurestore.
  • PROJECT_NUMBER: Project number for your project (appears in the response).

HTTP method and URL:

GET https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "name": "projects/PROJECT_NUMBER/locations/us-central1/featurestores/FEATURESTORE_ID",
  "createTime": "2021-02-25T00:39:40.598781Z",
  "updateTime": "2021-02-25T00:39:40.744038Z",
  "etag": "AMEw9yNy_b4IaMIvw1803ZT38cpUtjfwlyLkR709oBCY6pQrm6dHophLcqhrvsNqkQQZ",
  "onlineServingConfig": {
    "fixedNodeCount": 3
  },
  "state": "STABLE"
}

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.

Update a featurestore

Update a featurestore, for example, to change the number of online serving nodes or update labels on a featurestore.

Web UI

Use another method. You cannot update a featurestore from the Cloud Console.

REST & CMD LINE

To update a featurestore, send a PATCH request by using the featurestores.patch method.

The following sample updates the number of online serving nodes to 2 for the featurestore. All other settings remain the same.

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 or project number.
  • FEATURESTORE_ID: ID of the featurestore.
  • PROJECT_NUMBER: Project number for your project (appears in the response).

HTTP method and URL:

PATCH https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID

Request JSON body:

{
  "online_serving_config": {
    "fixed_node_count": 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 PATCH \
-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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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 PATCH `
-Headers $headers `
-ContentType: "application/json; charset=utf-8" `
-InFile request.json `
-Uri "https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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.v1beta1.UpdateFeaturestoreOperationMetadata",
    "genericMetadata": {
      "createTime": "2021-03-18T21:12:08.373664Z",
      "updateTime": "2021-03-18T21:12:08.373664Z"
    }
  }
}

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 featurestore

Delete a feature. Before you delete a featurestore, delete and all of its features and entity types first.

Web UI

Use another method. You cannot delete a featurestore from the Cloud Console.

REST & CMD LINE

To delete a featurestore and all of its content, send a DELETE request by using the featurestores.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 or project number.
  • FEATURESTORE_ID: ID of the featurestore.
  • PROJECT_NUMBER: Project number for your project (appears in the response).

HTTP method and URL:

DELETE https://LOCATION-aiplatform.googleapis.com/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_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/v1beta1/projects/PROJECT/locations/LOCATION/featurestores/FEATURESTORE_ID" | Select-Object -Expand Content

You should receive a JSON response similar to the following:

{
  "name": "projects/PROJECT_NUMBER/locations/LOCATION/operations/OPERATIONS_ID",
  "metadata": {
    "@type": "type.googleapis.com/google.cloud.aiplatform.v1beta1.DeleteOperationMetadata",
    "genericMetadata": {
      "createTime": "2021-05-03T17:50:21.813112Z",
      "updateTime": "2021-05-03T17:50:21.813112Z"
    }
  },
  "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