entity_types
Creates, updates, deletes, gets or lists an entity_types
resource.
Overview
Name | entity_types |
Type | Resource |
Id | google.aiplatform.entity_types |
Fields
The following fields are returned by SELECT
queries:
- get
- list
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Name of the EntityType. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} The last part entity_type is assigned by the client. The entity_type can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given a featurestore. |
createTime | string (google-datetime) | Output only. Timestamp when this EntityType was created. |
description | string | Optional. Description of the EntityType. |
etag | string | Optional. Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
labels | object | Optional. The labels with user-defined metadata to organize your EntityTypes. 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 EntityType (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
monitoringConfig | object | Optional. The default monitoring configuration for all Features with value type (Feature.ValueType) BOOL, STRING, DOUBLE or INT64 under this EntityType. If this is populated with [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is disabled. (id: GoogleCloudAiplatformV1FeaturestoreMonitoringConfig) |
offlineStorageTtlDays | integer (int32) | Optional. Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than offline_storage_ttl_days since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
updateTime | string (google-datetime) | Output only. Timestamp when this EntityType was most recently updated. |
Successful response
Name | Datatype | Description |
---|---|---|
name | string | Immutable. Name of the EntityType. Format: projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type} The last part entity_type is assigned by the client. The entity_type can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given a featurestore. |
createTime | string (google-datetime) | Output only. Timestamp when this EntityType was created. |
description | string | Optional. Description of the EntityType. |
etag | string | Optional. Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens. |
labels | object | Optional. The labels with user-defined metadata to organize your EntityTypes. 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 EntityType (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable. |
monitoringConfig | object | Optional. The default monitoring configuration for all Features with value type (Feature.ValueType) BOOL, STRING, DOUBLE or INT64 under this EntityType. If this is populated with [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is disabled. (id: GoogleCloudAiplatformV1FeaturestoreMonitoringConfig) |
offlineStorageTtlDays | integer (int32) | Optional. Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than offline_storage_ttl_days since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL. |
satisfiesPzi | boolean | Output only. Reserved for future use. |
satisfiesPzs | boolean | Output only. Reserved for future use. |
updateTime | string (google-datetime) | Output only. Timestamp when this EntityType was most recently updated. |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
get | select | projectsId , locationsId , featurestoresId , entityTypesId | Gets details of a single EntityType. | |
list | select | projectsId , locationsId , featurestoresId | filter , pageSize , pageToken , orderBy , readMask | Lists EntityTypes in a given Featurestore. |
create | insert | projectsId , locationsId , featurestoresId | entityTypeId | Creates a new EntityType in a given Featurestore. |
patch | update | projectsId , locationsId , featurestoresId , entityTypesId | updateMask | Updates the parameters of a single EntityType. |
delete | delete | projectsId , locationsId , featurestoresId , entityTypesId | force | Deletes a single EntityType. The EntityType must not have any Features or force must be set to true for the request to succeed. |
read_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Reads Feature values of a specific entity of an EntityType. For reading feature values of multiple entities of an EntityType, please use StreamingReadFeatureValues. | |
streaming_read_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Reads Feature values for multiple entities. Depending on their size, data for different entities may be broken up across multiple responses. | |
write_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Writes Feature values of one or more entities of an EntityType. The Feature values are merged into existing entities if any. The Feature values to be written must have timestamp within the online storage retention. | |
import_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Imports Feature values into the Featurestore from a source storage. The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done. If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done. There are also scenarios where the caller can cause inconsistency. - Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned. | |
export_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Exports Feature values from all the entities of a target EntityType. | |
delete_feature_values | exec | projectsId , locationsId , featurestoresId , entityTypesId | Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done. |
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 |
---|---|---|
entityTypesId | string | |
featurestoresId | string | |
locationsId | string | |
projectsId | string | |
entityTypeId | string | |
filter | string | |
force | boolean | |
orderBy | string | |
pageSize | integer (int32) | |
pageToken | string | |
readMask | string (google-fieldmask) | |
updateMask | string (google-fieldmask) |
SELECT
examples
- get
- list
Gets details of a single EntityType.
SELECT
name,
createTime,
description,
etag,
labels,
monitoringConfig,
offlineStorageTtlDays,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND featurestoresId = '{{ featurestoresId }}' -- required
AND entityTypesId = '{{ entityTypesId }}' -- required;
Lists EntityTypes in a given Featurestore.
SELECT
name,
createTime,
description,
etag,
labels,
monitoringConfig,
offlineStorageTtlDays,
satisfiesPzi,
satisfiesPzs,
updateTime
FROM google.aiplatform.entity_types
WHERE projectsId = '{{ projectsId }}' -- required
AND locationsId = '{{ locationsId }}' -- required
AND featurestoresId = '{{ featurestoresId }}' -- required
AND filter = '{{ filter }}'
AND pageSize = '{{ pageSize }}'
AND pageToken = '{{ pageToken }}'
AND orderBy = '{{ orderBy }}'
AND readMask = '{{ readMask }}';
INSERT
examples
- create
- Manifest
Creates a new EntityType in a given Featurestore.
INSERT INTO google.aiplatform.entity_types (
data__name,
data__description,
data__labels,
data__etag,
data__monitoringConfig,
data__offlineStorageTtlDays,
projectsId,
locationsId,
featurestoresId,
entityTypeId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ labels }}',
'{{ etag }}',
'{{ monitoringConfig }}',
{{ offlineStorageTtlDays }},
'{{ projectsId }}',
'{{ locationsId }}',
'{{ featurestoresId }}',
'{{ entityTypeId }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: entity_types
props:
- name: projectsId
value: string
description: Required parameter for the entity_types resource.
- name: locationsId
value: string
description: Required parameter for the entity_types resource.
- name: featurestoresId
value: string
description: Required parameter for the entity_types resource.
- name: name
value: string
description: >
Immutable. Name of the EntityType. Format: `projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}` The last part entity_type is assigned by the client. The entity_type can be up to 64 characters long and can consist only of ASCII Latin letters A-Z and a-z and underscore(_), and ASCII digits 0-9 starting with a letter. The value will be unique given a featurestore.
- name: description
value: string
description: >
Optional. Description of the EntityType.
- name: labels
value: object
description: >
Optional. The labels with user-defined metadata to organize your EntityTypes. 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 EntityType (System labels are excluded)." System reserved label keys are prefixed with "aiplatform.googleapis.com/" and are immutable.
- name: etag
value: string
description: >
Optional. Used to perform a consistent read-modify-write updates. If not set, a blind "overwrite" update happens.
- name: monitoringConfig
value: object
description: >
Optional. The default monitoring configuration for all Features with value type (Feature.ValueType) BOOL, STRING, DOUBLE or INT64 under this EntityType. If this is populated with [FeaturestoreMonitoringConfig.monitoring_interval] specified, snapshot analysis monitoring is enabled. Otherwise, snapshot analysis monitoring is disabled.
- name: offlineStorageTtlDays
value: integer
description: >
Optional. Config for data retention policy in offline storage. TTL in days for feature values that will be stored in offline storage. The Feature Store offline storage periodically removes obsolete feature values older than `offline_storage_ttl_days` since the feature generation time. If unset (or explicitly set to 0), default to 4000 days TTL.
- name: entityTypeId
value: string
UPDATE
examples
- patch
Updates the parameters of a single EntityType.
UPDATE google.aiplatform.entity_types
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__labels = '{{ labels }}',
data__etag = '{{ etag }}',
data__monitoringConfig = '{{ monitoringConfig }}',
data__offlineStorageTtlDays = {{ offlineStorageTtlDays }}
WHERE
projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featurestoresId = '{{ featurestoresId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
createTime,
description,
etag,
labels,
monitoringConfig,
offlineStorageTtlDays,
satisfiesPzi,
satisfiesPzs,
updateTime;
DELETE
examples
- delete
Deletes a single EntityType. The EntityType must not have any Features or force
must be set to true for the request to succeed.
DELETE FROM google.aiplatform.entity_types
WHERE projectsId = '{{ projectsId }}' --required
AND locationsId = '{{ locationsId }}' --required
AND featurestoresId = '{{ featurestoresId }}' --required
AND entityTypesId = '{{ entityTypesId }}' --required
AND force = '{{ force }}';
Lifecycle Methods
- read_feature_values
- streaming_read_feature_values
- write_feature_values
- import_feature_values
- export_feature_values
- delete_feature_values
Reads Feature values of a specific entity of an EntityType. For reading feature values of multiple entities of an EntityType, please use StreamingReadFeatureValues.
EXEC google.aiplatform.entity_types.read_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"entityId": "{{ entityId }}",
"featureSelector": "{{ featureSelector }}"
}';
Reads Feature values for multiple entities. Depending on their size, data for different entities may be broken up across multiple responses.
EXEC google.aiplatform.entity_types.streaming_read_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"entityIds": "{{ entityIds }}",
"featureSelector": "{{ featureSelector }}"
}';
Writes Feature values of one or more entities of an EntityType. The Feature values are merged into existing entities if any. The Feature values to be written must have timestamp within the online storage retention.
EXEC google.aiplatform.entity_types.write_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"payloads": "{{ payloads }}"
}';
Imports Feature values into the Featurestore from a source storage. The progress of the import is tracked by the returned operation. The imported features are guaranteed to be visible to subsequent read operations after the operation is marked as successfully done. If an import operation fails, the Feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same import request again and wait till the new operation returned is marked as successfully done. There are also scenarios where the caller can cause inconsistency. - Source data for import contains multiple distinct Feature values for the same entity ID and timestamp. - Source is modified during an import. This includes adding, updating, or removing source data and/or metadata. Examples of updating metadata include but are not limited to changing storage location, storage class, or retention policy. - Online serving cluster is under-provisioned.
EXEC google.aiplatform.entity_types.import_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"avroSource": "{{ avroSource }}",
"bigquerySource": "{{ bigquerySource }}",
"csvSource": "{{ csvSource }}",
"featureTimeField": "{{ featureTimeField }}",
"featureTime": "{{ featureTime }}",
"entityIdField": "{{ entityIdField }}",
"featureSpecs": "{{ featureSpecs }}",
"disableOnlineServing": {{ disableOnlineServing }},
"workerCount": {{ workerCount }},
"disableIngestionAnalysis": {{ disableIngestionAnalysis }}
}';
Exports Feature values from all the entities of a target EntityType.
EXEC google.aiplatform.entity_types.export_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"snapshotExport": "{{ snapshotExport }}",
"fullExport": "{{ fullExport }}",
"destination": "{{ destination }}",
"featureSelector": "{{ featureSelector }}",
"settings": "{{ settings }}"
}';
Delete Feature values from Featurestore. The progress of the deletion is tracked by the returned operation. The deleted feature values are guaranteed to be invisible to subsequent read operations after the operation is marked as successfully done. If a delete feature values operation fails, the feature values returned from reads and exports may be inconsistent. If consistency is required, the caller must retry the same delete request again and wait till the new operation returned is marked as successfully done.
EXEC google.aiplatform.entity_types.delete_feature_values
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@featurestoresId='{{ featurestoresId }}' --required,
@entityTypesId='{{ entityTypesId }}' --required
@@json=
'{
"selectEntity": "{{ selectEntity }}",
"selectTimeRangeAndFeature": "{{ selectTimeRangeAndFeature }}"
}';