Skip to main content

feature_views

Creates, updates, deletes, gets or lists a feature_views resource.

Overview

Namefeature_views
TypeResource
Idgoogle.aiplatform.feature_views

Fields

NameDatatypeDescription
namestringIdentifier. Name of the FeatureView. Format: projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}
bigQuerySourceobject
createTimestringOutput only. Timestamp when this FeatureView was created.
etagstringOptional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
featureRegistrySourceobjectA Feature Registry source for features that need to be synced to Online Store.
indexConfigobjectConfiguration for vector indexing.
labelsobjectOptional. 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.
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
syncConfigobjectConfiguration for Sync. Only one option is set.
updateTimestringOutput only. Timestamp when this FeatureView was last updated.
vertexRagSourceobjectA Vertex Rag source for features that need to be synced to Online Store.

Methods

NameAccessible byRequired ParamsDescription
getSELECTfeatureOnlineStoresId, featureViewsId, locationsId, projectsIdGets details of a single FeatureView.
listSELECTfeatureOnlineStoresId, locationsId, projectsIdLists FeatureViews in a given FeatureOnlineStore.
createINSERTfeatureOnlineStoresId, locationsId, projectsIdCreates a new FeatureView in a given FeatureOnlineStore.
deleteDELETEfeatureOnlineStoresId, featureViewsId, locationsId, projectsIdDeletes a single FeatureView.
patchUPDATEfeatureOnlineStoresId, featureViewsId, locationsId, projectsIdUpdates the parameters of a single FeatureView.
search_nearest_entitiesEXECfeatureOnlineStoresId, featureViewsId, locationsId, projectsIdSearch the nearest entities under a FeatureView. Search only works for indexable feature view; if a feature view isn't indexable, returns Invalid argument response.
syncEXECfeatureOnlineStoresId, featureViewsId, locationsId, projectsIdTriggers on-demand sync for the FeatureView.

SELECT examples

Lists FeatureViews in a given FeatureOnlineStore.

SELECT
name,
bigQuerySource,
createTime,
etag,
featureRegistrySource,
indexConfig,
labels,
satisfiesPzi,
satisfiesPzs,
syncConfig,
updateTime,
vertexRagSource
FROM google.aiplatform.feature_views
WHERE featureOnlineStoresId = '{{ featureOnlineStoresId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new feature_views resource.

/*+ create */
INSERT INTO google.aiplatform.feature_views (
featureOnlineStoresId,
locationsId,
projectsId,
etag,
labels,
bigQuerySource,
name,
featureRegistrySource,
indexConfig,
vertexRagSource,
syncConfig
)
SELECT
'{{ featureOnlineStoresId }}',
'{{ locationsId }}',
'{{ projectsId }}',
'{{ etag }}',
'{{ labels }}',
'{{ bigQuerySource }}',
'{{ name }}',
'{{ featureRegistrySource }}',
'{{ indexConfig }}',
'{{ vertexRagSource }}',
'{{ syncConfig }}'
;

UPDATE example

Updates a feature_views resource.

/*+ update */
UPDATE google.aiplatform.feature_views
SET
etag = '{{ etag }}',
labels = '{{ labels }}',
bigQuerySource = '{{ bigQuerySource }}',
name = '{{ name }}',
featureRegistrySource = '{{ featureRegistrySource }}',
indexConfig = '{{ indexConfig }}',
vertexRagSource = '{{ vertexRagSource }}',
syncConfig = '{{ syncConfig }}'
WHERE
featureOnlineStoresId = '{{ featureOnlineStoresId }}'
AND featureViewsId = '{{ featureViewsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified feature_views resource.

/*+ delete */
DELETE FROM google.aiplatform.feature_views
WHERE featureOnlineStoresId = '{{ featureOnlineStoresId }}'
AND featureViewsId = '{{ featureViewsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';