Skip to main content

featurestores

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

Overview

Namefeaturestores
TypeResource
Idgoogle.aiplatform.featurestores

Fields

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringOutput only. Name of the Featurestore. Format: projects/{project}/locations/{location}/featurestores/{featurestore}
createTimestring (google-datetime)Output only. Timestamp when this Featurestore was created.
encryptionSpecobjectOptional. Customer-managed encryption key spec for data storage. If set, both of the online and offline data storage will be secured by this key. (id: GoogleCloudAiplatformV1EncryptionSpec)
etagstringOptional. Used to perform consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
labelsobjectOptional. The labels with user-defined metadata to organize your Featurestore. 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 Featurestore(System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
onlineServingConfigobjectOptional. Config for online storage resources. The field should not co-exist with the field of OnlineStoreReplicationConfig. If both of it and OnlineStoreReplicationConfig are unset, the feature store will not have an online store and cannot be used for online serving. (id: GoogleCloudAiplatformV1FeaturestoreOnlineServingConfig)
onlineStorageTtlDaysinteger (int32)Optional. TTL in days for feature values that will be stored in online serving storage. The Feature Store online storage periodically removes obsolete feature values older than online_storage_ttl_days since the feature generation time. Note that online_storage_ttl_days should be less than or equal to offline_storage_ttl_days for each EntityType under a featurestore. If not set, default to 4000 days
satisfiesPzibooleanOutput only. Reserved for future use.
satisfiesPzsbooleanOutput only. Reserved for future use.
statestringOutput only. State of the featurestore.
updateTimestring (google-datetime)Output only. Timestamp when this Featurestore was last updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, locationsId, featurestoresIdGets details of a single Featurestore.
listselectprojectsId, locationsIdfilter, pageSize, pageToken, orderBy, readMaskLists Featurestores in a given project and location.
createinsertprojectsId, locationsIdfeaturestoreIdCreates a new Featurestore in a given project and location.
patchupdateprojectsId, locationsId, featurestoresIdupdateMaskUpdates the parameters of a single Featurestore.
deletedeleteprojectsId, locationsId, featurestoresIdforceDeletes a single Featurestore. The Featurestore must not contain any EntityTypes or force must be set to true for the request to succeed.
batch_read_feature_valuesexecprojectsId, locationsId, featurestoresIdBatch reads Feature values from a Featurestore. This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.
search_featuresexecprojectsId, locationsIdquery, pageSize, pageTokenSearches Features matching a query in a given project.

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.

NameDatatypeDescription
featurestoresIdstring
locationsIdstring
projectsIdstring
featurestoreIdstring
filterstring
forceboolean
orderBystring
pageSizeinteger (int32)
pageTokenstring
querystring
readMaskstring (google-fieldmask)
updateMaskstring (google-fieldmask)

SELECT examples

Gets details of a single Featurestore.

SELECT
name,
createTime,
encryptionSpec,
etag,
labels,
onlineServingConfig,
onlineStorageTtlDays,
satisfiesPzi,
satisfiesPzs,
state,
updateTime
FROM google.aiplatform.featurestores
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND featurestoresId = '{{ featurestoresId }}' -- required;

INSERT examples

Creates a new Featurestore in a given project and location.

INSERT INTO google.aiplatform.featurestores (
data__etag,
data__labels,
data__onlineServingConfig,
data__onlineStorageTtlDays,
data__encryptionSpec,
projectsId,
locationsId,
featurestoreId
)
SELECT
'{{ etag }}',
'{{ labels }}',
'{{ onlineServingConfig }}',
{{ onlineStorageTtlDays }},
'{{ encryptionSpec }}',
'{{ projectsId }}',
'{{ locationsId }}',
'{{ featurestoreId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates the parameters of a single Featurestore.

UPDATE google.aiplatform.featurestores
SET
data__etag = '{{ etag }}',
data__labels = '{{ labels }}',
data__onlineServingConfig = '{{ onlineServingConfig }}',
data__onlineStorageTtlDays = {{ onlineStorageTtlDays }},
data__encryptionSpec = '{{ encryptionSpec }}'
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featurestoresId = '{{ featurestoresId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a single Featurestore. The Featurestore must not contain any EntityTypes or force must be set to true for the request to succeed.

DELETE FROM google.aiplatform.featurestores
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featurestoresId = '{{ featurestoresId }}' --required
AND force = '{{ force }}';

Lifecycle Methods

Batch reads Feature values from a Featurestore. This API enables batch reading Feature values, where each read instance in the batch may read Feature values of entities from one or more EntityTypes. Point-in-time correctness is guaranteed for Feature values of each read instance as of each instance's read timestamp.

EXEC google.aiplatform.featurestores.batch_read_feature_values 
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required
@@json=
'{
"csvReadInstances": "{{ csvReadInstances }}",
"bigqueryReadInstances": "{{ bigqueryReadInstances }}",
"destination": "{{ destination }}",
"passThroughFields": "{{ passThroughFields }}",
"entityTypeSpecs": "{{ entityTypeSpecs }}",
"startTime": "{{ startTime }}"
}';