feature_views
Creates, updates, deletes, gets or lists a feature_views resource.
Overview
| Name | feature_views |
| Type | Resource |
| Id | google.aiplatform.feature_views |
Fields
The following fields are returned by SELECT queries:
- get
- list
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of the FeatureView. Format: projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view} |
bigQuerySource | object | Optional. Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewBigQuerySource) |
bigtableMetadata | object | Output only. Metadata containing information about the Cloud Bigtable. (id: GoogleCloudAiplatformV1FeatureViewBigtableMetadata) |
createTime | string (google-datetime) | Output only. Timestamp when this FeatureView was created. |
etag | string | Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
featureRegistrySource | object | Optional. Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource) |
indexConfig | object | Optional. Configuration for index preparation for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. (id: GoogleCloudAiplatformV1FeatureViewIndexConfig) |
labels | object | Optional. The labels with user-defined metadata to organize your FeatureViews. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one FeatureOnlineStore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
optimizedConfig | object | Optional. Configuration for FeatureView created under Optimized FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewOptimizedConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
serviceAccountEmail | string | Output only. A Service Account unique to this FeatureView. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to sync data to the online store. |
serviceAgentType | string | Optional. Service agent type used during data sync. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureView within a project, a separate service account should be provisioned by setting this field to SERVICE_AGENT_TYPE_FEATURE_VIEW. This will generate a separate service account to access the BigQuery source table. (SERVICE_AGENT_TYPE_UNSPECIFIED, SERVICE_AGENT_TYPE_PROJECT, SERVICE_AGENT_TYPE_FEATURE_VIEW) |
syncConfig | object | Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. (id: GoogleCloudAiplatformV1FeatureViewSyncConfig) |
updateTime | string (google-datetime) | Output only. Timestamp when this FeatureView was last updated. |
vertexRagSource | object | Optional. The Vertex RAG Source that the FeatureView is linked to. (id: GoogleCloudAiplatformV1FeatureViewVertexRagSource) |
| Name | Datatype | Description |
|---|---|---|
name | string | Identifier. Name of the FeatureView. Format: projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view} |
bigQuerySource | object | Optional. Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewBigQuerySource) |
bigtableMetadata | object | Output only. Metadata containing information about the Cloud Bigtable. (id: GoogleCloudAiplatformV1FeatureViewBigtableMetadata) |
createTime | string (google-datetime) | Output only. Timestamp when this FeatureView was created. |
etag | string | Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
featureRegistrySource | object | Optional. Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewFeatureRegistrySource) |
indexConfig | object | Optional. Configuration for index preparation for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving. (id: GoogleCloudAiplatformV1FeatureViewIndexConfig) |
labels | object | Optional. The labels with user-defined metadata to organize your FeatureViews. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one FeatureOnlineStore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
optimizedConfig | object | Optional. Configuration for FeatureView created under Optimized FeatureOnlineStore. (id: GoogleCloudAiplatformV1FeatureViewOptimizedConfig) |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
serviceAccountEmail | string | Output only. A Service Account unique to this FeatureView. The role bigquery.dataViewer should be granted to this service account to allow Vertex AI Feature Store to sync data to the online store. |
serviceAgentType | string | Optional. Service agent type used during data sync. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureView within a project, a separate service account should be provisioned by setting this field to SERVICE_AGENT_TYPE_FEATURE_VIEW. This will generate a separate service account to access the BigQuery source table. (SERVICE_AGENT_TYPE_UNSPECIFIED, SERVICE_AGENT_TYPE_PROJECT, SERVICE_AGENT_TYPE_FEATURE_VIEW) |
syncConfig | object | Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving. (id: GoogleCloudAiplatformV1FeatureViewSyncConfig) |
updateTime | string (google-datetime) | Output only. Timestamp when this FeatureView was last updated. |
vertexRagSource | object | Optional. The Vertex RAG Source that the FeatureView is linked to. (id: GoogleCloudAiplatformV1FeatureViewVertexRagSource) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Gets details of a single FeatureView. | |
list | select | projectsId, locationsId, featureOnlineStoresId | pageSize, pageToken, orderBy, filter | Lists FeatureViews in a given FeatureOnlineStore. |
create | insert | projectsId, locationsId, featureOnlineStoresId | featureViewId, runSyncImmediately | Creates a new FeatureView in a given FeatureOnlineStore. |
patch | update | projectsId, locationsId, featureOnlineStoresId, featureViewsId | updateMask | Updates the parameters of a single FeatureView. |
delete | delete | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Deletes a single FeatureView. | |
generate_fetch_access_token | exec | projectsId, locationsId, featureOnlineStoresId, featureViewsId | RPC to generate an access token for the given feature view. FeatureViews under the same FeatureOnlineStore share the same access token. | |
fetch_feature_values | exec | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Fetch feature values under a FeatureView. | |
search_nearest_entities | exec | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Search the nearest entities under a FeatureView. Search only works for indexable feature view; if a feature view isn't indexable, returns Invalid argument response. | |
sync | exec | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Triggers on-demand sync for the FeatureView. | |
direct_write | exec | projectsId, locationsId, featureOnlineStoresId, featureViewsId | Bidirectional streaming RPC to directly write to feature values in a feature view. Requests may not have a one-to-one mapping to responses and responses may be returned out-of-order to reduce latency. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
featureOnlineStoresId | string | |
featureViewsId | string | |
locationsId | string | |
projectsId | string | |
featureViewId | string | |
filter | string | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
runSyncImmediately | boolean | |
updateMask | string (google-fieldmask) |
SELECT examples
- get
- list
Gets details of a single FeatureView.
SELECT
name,
bigQuerySource,
bigtableMetadata,
createTime,
etag,
featureRegistrySource,
indexConfig,
labels,
optimizedConfig,
satisfiesPzi,
satisfiesPzs,
serviceAccountEmail,
serviceAgentType,
syncConfig,
updateTime,
vertexRagSource
FROM google.aiplatform.feature_views
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND featureOnlineStoresId = '{{ featureOnlineStoresId }}' -- required
AND featureViewsId = '{{ featureViewsId }}' -- required
;
Lists FeatureViews in a given FeatureOnlineStore.
SELECT
name,
bigQuerySource,
bigtableMetadata,
createTime,
etag,
featureRegistrySource,
indexConfig,
labels,
optimizedConfig,
satisfiesPzi,
satisfiesPzs,
serviceAccountEmail,
serviceAgentType,
syncConfig,
updateTime,
vertexRagSource
FROM google.aiplatform.feature_views
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND featureOnlineStoresId = '{{ featureOnlineStoresId }}' -- required
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND filter = '{{ filter }}'
;
INSERT examples
- create
- Manifest
Creates a new FeatureView in a given FeatureOnlineStore.
INSERT INTO google.aiplatform.feature_views (
data__syncConfig,
data__vertexRagSource,
data__featureRegistrySource,
data__name,
data__labels,
data__serviceAgentType,
data__indexConfig,
data__etag,
data__optimizedConfig,
data__bigQuerySource,
projectsId,
locationsId,
featureOnlineStoresId,
featureViewId,
runSyncImmediately
)
SELECT
'{{ syncConfig }}',
'{{ vertexRagSource }}',
'{{ featureRegistrySource }}',
'{{ name }}',
'{{ labels }}',
'{{ serviceAgentType }}',
'{{ indexConfig }}',
'{{ etag }}',
'{{ optimizedConfig }}',
'{{ bigQuerySource }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ featureOnlineStoresId }}',
'{{ featureViewId }}',
'{{ runSyncImmediately }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: feature_views
props:
- name: projectsId
value: "{{ projectsId }}"
description: Required parameter for the feature_views resource.
- name: locationsId
value: "{{ locationsId }}"
description: Required parameter for the feature_views resource.
- name: featureOnlineStoresId
value: "{{ featureOnlineStoresId }}"
description: Required parameter for the feature_views resource.
- name: syncConfig
description: |
Configures when data is to be synced/updated for this FeatureView. At the end of the sync the latest featureValues for each entityId of this FeatureView are made ready for online serving.
value:
cron: "{{ cron }}"
continuous: {{ continuous }}
- name: vertexRagSource
description: |
Optional. The Vertex RAG Source that the FeatureView is linked to.
value:
uri: "{{ uri }}"
ragCorpusId: "{{ ragCorpusId }}"
- name: featureRegistrySource
description: |
Optional. Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore.
value:
featureGroups:
- featureGroupId: "{{ featureGroupId }}"
featureIds: "{{ featureIds }}"
projectNumber: "{{ projectNumber }}"
- name: name
value: "{{ name }}"
description: |
Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
- name: labels
value: "{{ labels }}"
description: |
Optional. The labels with user-defined metadata to organize your FeatureViews. Label keys and values can be no longer than 64 characters (Unicode codepoints), can only contain lowercase letters, numeric characters, underscores and dashes. International characters are allowed. See https://goo.gl/xmQnxf for more information on and examples of labels. No more than 64 user labels can be associated with one FeatureOnlineStore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
- name: serviceAgentType
value: "{{ serviceAgentType }}"
description: |
Optional. Service agent type used during data sync. By default, the Vertex AI Service Agent is used. When using an IAM Policy to isolate this FeatureView within a project, a separate service account should be provisioned by setting this field to `SERVICE_AGENT_TYPE_FEATURE_VIEW`. This will generate a separate service account to access the BigQuery source table.
valid_values: ['SERVICE_AGENT_TYPE_UNSPECIFIED', 'SERVICE_AGENT_TYPE_PROJECT', 'SERVICE_AGENT_TYPE_FEATURE_VIEW']
- name: indexConfig
description: |
Optional. Configuration for index preparation for vector search. It contains the required configurations to create an index from source data, so that approximate nearest neighbor (a.k.a ANN) algorithms search can be performed during online serving.
value:
bruteForceConfig: "{{ bruteForceConfig }}"
embeddingColumn: "{{ embeddingColumn }}"
distanceMeasureType: "{{ distanceMeasureType }}"
crowdingColumn: "{{ crowdingColumn }}"
embeddingDimension: {{ embeddingDimension }}
treeAhConfig:
leafNodeEmbeddingCount: "{{ leafNodeEmbeddingCount }}"
filterColumns:
- "{{ filterColumns }}"
- name: etag
value: "{{ etag }}"
description: |
Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
- name: optimizedConfig
description: |
Optional. Configuration for FeatureView created under Optimized FeatureOnlineStore.
value:
automaticResources:
maxReplicaCount: {{ maxReplicaCount }}
minReplicaCount: {{ minReplicaCount }}
- name: bigQuerySource
description: |
Optional. Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore.
value:
uri: "{{ uri }}"
entityIdColumns:
- "{{ entityIdColumns }}"
- name: featureViewId
value: "{{ featureViewId }}"
- name: runSyncImmediately
value: {{ runSyncImmediately }}
UPDATE examples
- patch
Updates the parameters of a single FeatureView.
UPDATE google.aiplatform.feature_views
SET
data__syncConfig = '{{ syncConfig }}',
data__vertexRagSource = '{{ vertexRagSource }}',
data__featureRegistrySource = '{{ featureRegistrySource }}',
data__name = '{{ name }}',
data__labels = '{{ labels }}',
data__serviceAgentType = '{{ serviceAgentType }}',
data__indexConfig = '{{ indexConfig }}',
data__etag = '{{ etag }}',
data__optimizedConfig = '{{ optimizedConfig }}',
data__bigQuerySource = '{{ bigQuerySource }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featureOnlineStoresId = '{{ featureOnlineStoresId }}' --required
AND featureViewsId = '{{ featureViewsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;
DELETE examples
- delete
Deletes a single FeatureView.
DELETE FROM google.aiplatform.feature_views
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featureOnlineStoresId = '{{ featureOnlineStoresId }}' --required
AND featureViewsId = '{{ featureViewsId }}' --required
;
Lifecycle Methods
- generate_fetch_access_token
- fetch_feature_values
- search_nearest_entities
- sync
- direct_write
RPC to generate an access token for the given feature view. FeatureViews under the same FeatureOnlineStore share the same access token.
EXEC google.aiplatform.feature_views.generate_fetch_access_token
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featureOnlineStoresId='{{ featureOnlineStoresId }}' --required,
@featureViewsId='{{ featureViewsId }}' --required
;
Fetch feature values under a FeatureView.
EXEC google.aiplatform.feature_views.fetch_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featureOnlineStoresId='{{ featureOnlineStoresId }}' --required,
@featureViewsId='{{ featureViewsId }}' --required
@@json=
'{
"dataFormat": "{{ dataFormat }}",
"dataKey": "{{ dataKey }}"
}'
;
Search the nearest entities under a FeatureView. Search only works for indexable feature view; if a feature view isn't indexable, returns Invalid argument response.
EXEC google.aiplatform.feature_views.search_nearest_entities
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featureOnlineStoresId='{{ featureOnlineStoresId }}' --required,
@featureViewsId='{{ featureViewsId }}' --required
@@json=
'{
"query": "{{ query }}",
"returnFullEntity": {{ returnFullEntity }}
}'
;
Triggers on-demand sync for the FeatureView.
EXEC google.aiplatform.feature_views.sync
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featureOnlineStoresId='{{ featureOnlineStoresId }}' --required,
@featureViewsId='{{ featureViewsId }}' --required
;
Bidirectional streaming RPC to directly write to feature values in a feature view. Requests may not have a one-to-one mapping to responses and responses may be returned out-of-order to reduce latency.
EXEC google.aiplatform.feature_views.direct_write
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featureOnlineStoresId='{{ featureOnlineStoresId }}' --required,
@featureViewsId='{{ featureViewsId }}' --required
@@json=
'{
"dataKeyAndFeatureValues": "{{ dataKeyAndFeatureValues }}"
}'
;