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
Successful response
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) |
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. |
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) |
Successful response
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) |
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. |
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 | filter , pageSize , pageToken , orderBy | 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. | |
sync | exec | projectsId , locationsId , featureOnlineStoresId , featureViewsId | Triggers on-demand sync for the FeatureView. | |
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. | |
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,
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,
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 filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}';
INSERT
examples
- create
- Manifest
Creates a new FeatureView in a given FeatureOnlineStore.
INSERT INTO google.aiplatform.feature_views (
data__bigQuerySource,
data__featureRegistrySource,
data__vertexRagSource,
data__name,
data__etag,
data__labels,
data__syncConfig,
data__indexConfig,
data__optimizedConfig,
data__serviceAgentType,
projectsId,
locationsId,
featureOnlineStoresId,
featureViewId,
runSyncImmediately
)
SELECT
'{{ bigQuerySource }}',
'{{ featureRegistrySource }}',
'{{ vertexRagSource }}',
'{{ name }}',
'{{ etag }}',
'{{ labels }}',
'{{ syncConfig }}',
'{{ indexConfig }}',
'{{ optimizedConfig }}',
'{{ serviceAgentType }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ featureOnlineStoresId }}',
'{{ featureViewId }}',
'{{ runSyncImmediately }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: feature_views
props:
- name: projectsId
value: string
description: Required parameter for the feature_views resource.
- name: locationsId
value: string
description: Required parameter for the feature_views resource.
- name: featureOnlineStoresId
value: string
description: Required parameter for the feature_views resource.
- name: bigQuerySource
value: object
description: >
Optional. Configures how data is supposed to be extracted from a BigQuery source to be loaded onto the FeatureOnlineStore.
- name: featureRegistrySource
value: object
description: >
Optional. Configures the features from a Feature Registry source that need to be loaded onto the FeatureOnlineStore.
- name: vertexRagSource
value: object
description: >
Optional. The Vertex RAG Source that the FeatureView is linked to.
- name: name
value: string
description: >
Identifier. Name of the FeatureView. Format: `projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`
- name: etag
value: string
description: >
Optional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
- name: labels
value: object
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: syncConfig
value: object
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.
- name: indexConfig
value: object
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.
- name: optimizedConfig
value: object
description: >
Optional. Configuration for FeatureView created under Optimized FeatureOnlineStore.
- name: serviceAgentType
value: string
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: featureViewId
value: string
- name: runSyncImmediately
value: boolean
UPDATE
examples
- patch
Updates the parameters of a single FeatureView.
UPDATE google.aiplatform.feature_views
SET
data__bigQuerySource = '{{ bigQuerySource }}',
data__featureRegistrySource = '{{ featureRegistrySource }}',
data__vertexRagSource = '{{ vertexRagSource }}',
data__name = '{{ name }}',
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__syncConfig = '{{ syncConfig }}',
data__indexConfig = '{{ indexConfig }}',
data__optimizedConfig = '{{ optimizedConfig }}',
data__serviceAgentType = '{{ serviceAgentType }}'
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
- sync
- fetch_feature_values
- search_nearest_entities
- direct_write
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;
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=
'{
"dataKey": "{{ dataKey }}",
"dataFormat": "{{ dataFormat }}"
}';
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 }}
}';
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 }}"
}';